From 3999be23002d2c58aa525a6f3f846b62015d87ca Mon Sep 17 00:00:00 2001 From: mboelen Date: Mon, 25 Jan 2016 13:54:09 +0100 Subject: Avoid errors on screen if sysctl keys are not readable --- include/tests_networking | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/tests_networking') diff --git a/include/tests_networking b/include/tests_networking index bc7e9876..3c45678e 100644 --- a/include/tests_networking +++ b/include/tests_networking @@ -41,7 +41,7 @@ IPV6_ONLY=255 IPV6_MISCONFIGURED=0 IPV6_MISCONFIGURED_MTU=0 - FIND=`sysctl -a --pattern "^net.ipv6" | sed "s/ = /=/"` + FIND=`sysctl -a --pattern "^net.ipv6" 2> /dev/null | sed "s/ = /=/"` if [ ! "${FIND}" = "" ]; then IPV6_CONFIGURED=1 for I in ${FIND}; do @@ -85,7 +85,6 @@ if [ ${IPV6_CONFIGURED} -eq 1 ]; then Display --indent 2 --text "- Checking IPv6 configuration" --result "ENABLED" --color WHITE STATUS=`echo ${IPV6_MODE} | tr '[:lower:]' '[:upper:]'` - Display --indent 6 --text "Configuration method" --result "${STATUS}" --color WHITE if [ ${IPV6_ONLY} -eq 1 ]; then STATUS="YES"; else STATUS="NO"; fi LogText "Result: IPv6 only configuration: ${STATUS}" -- cgit v1.2.3