mirror of https://github.com/CISOfy/lynis.git
Avoid errors on screen if sysctl keys are not readable
This commit is contained in:
parent
727ff26283
commit
3999be2300
|
@ -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}"
|
||||
|
|
Loading…
Reference in New Issue