From b1403aac206ac70d6cede5c3a77365c5c856a580 Mon Sep 17 00:00:00 2001 From: mboelen Date: Tue, 19 Apr 2016 21:09:27 +0200 Subject: [PATCH] Only show specific status of services when using --verbose --- include/tests_nameservices | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/tests_nameservices b/include/tests_nameservices index bb74c579..3d966e11 100644 --- a/include/tests_nameservices +++ b/include/tests_nameservices @@ -49,7 +49,7 @@ FIND=`awk '/^domain/ { print $2 }' /etc/resolv.conf` if [ "${FIND}" = "" ]; then LogText "Result: no default domain found" - Display --indent 2 --text "- Checking default DNS search domain" --result NONE --color WHITE + if IsVerbose; then Display --indent 2 --text "- Checking default DNS search domain" --result NONE --color WHITE; fi else LogText "Result: found default domain" LogText "Output: ${FIND}" @@ -118,7 +118,7 @@ FIND=`grep "^options" /etc/resolv.conf | awk '{ print $2 }'` if [ "${FIND}" = "" ]; then LogText "Result: no specific other options configured in /etc/resolv.conf" - Display --indent 2 --text "- Checking /etc/resolv.conf options" --result "NONE" --color WHITE + if IsVerbose; then Display --indent 2 --text "- Checking /etc/resolv.conf options" --result "NONE" --color WHITE; fi else for I in ${FIND}; do LogText "Found option: ${I}" @@ -238,7 +238,7 @@ Display --indent 2 --text "- Checking nscd status" --result RUNNING --color GREEN else LogText "Result: nscd is not running" - Display --indent 2 --text "- Checking nscd status" --result "NOT FOUND" --color WHITE + if IsVerbose; then Display --indent 2 --text "- Checking nscd status" --result "NOT FOUND" --color WHITE; fi fi fi # @@ -257,7 +257,7 @@ Display --indent 2 --text "- Checking Unbound status" --result RUNNING --color GREEN else LogText "Result: Unbound daemon is not running" - Display --indent 2 --text "- Checking Unbound status" --result "NOT FOUND" --color WHITE + if IsVerbose; then Display --indent 2 --text "- Checking Unbound status" --result "NOT FOUND" --color WHITE; fi fi fi # @@ -301,7 +301,7 @@ BIND_RUNNING=1 else LogText "Result: BIND not running" - Display --indent 2 --text "- Checking BIND status" --result "NOT FOUND" --color WHITE + if IsVerbose; then Display --indent 2 --text "- Checking BIND status" --result "NOT FOUND" --color WHITE; fi fi fi # @@ -414,7 +414,7 @@ POWERDNS_RUNNING=1 else LogText "Result: PowerDNS not running" - Display --indent 2 --text "- Checking PowerDNS status" --result "NOT FOUND" --color WHITE + if IsVerbose; then Display --indent 2 --text "- Checking PowerDNS status" --result "NOT FOUND" --color WHITE; fi fi fi # @@ -518,7 +518,7 @@ fi else LogText "Result: ypbind is not active" - Display --indent 2 --text "- Checking ypbind status" --result "NOT FOUND" --color WHITE + if IsVerbose; then Display --indent 2 --text "- Checking ypbind status" --result "NOT FOUND" --color WHITE; fi fi fi #