Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormboelen <michael@cisofy.com>2016-01-25 15:54:09 +0300
committermboelen <michael@cisofy.com>2016-01-25 15:54:09 +0300
commit3999be23002d2c58aa525a6f3f846b62015d87ca (patch)
tree4ae0dea6ea40d75baefbda9e6f82005bb4d7d071 /include/tests_networking
parent727ff26283bf90b27daa035675cac348efab2fb2 (diff)
Avoid errors on screen if sysctl keys are not readable
Diffstat (limited to 'include/tests_networking')
-rw-r--r--include/tests_networking3
1 files changed, 1 insertions, 2 deletions
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}"