Avoid errors on screen if sysctl keys are not readable

This commit is contained in:
mboelen 2016-01-25 13:54:09 +01:00
parent 727ff26283
commit 3999be2300
1 changed files with 1 additions and 2 deletions

View File

@ -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}"