diff options
Diffstat (limited to 'include/tests_networking')
-rw-r--r-- | include/tests_networking | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/include/tests_networking b/include/tests_networking index 5902d174..70a2fe30 100644 --- a/include/tests_networking +++ b/include/tests_networking @@ -87,20 +87,20 @@ LogText "Result: IPV6 mode is ${IPV6_MODE}" if [ ${IPV6_CONFIGURED} -eq 1 ]; then - Display --indent 2 --text "- Checking IPv6 configuration" --result "ENABLED" --color WHITE + Display --indent 2 --text "- Checking IPv6 configuration" --result "${STATUS_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}" Display --indent 6 --text "IPv6 only" --result "${STATUS}" --color WHITE else - Display --indent 2 --text "- Checking IPv6 configuration" --result "DISABLED" --color WHITE + Display --indent 2 --text "- Checking IPv6 configuration" --result "${STATUS_DISABLED}" --color WHITE fi # Configuration errors if [ ${IPV6_MISCONFIGURED_MTU} -eq 1 ]; then IPV6_MISCONFIGURED=1 LogText "Result: MTU of IPv6 interfaces should be 1280 or higher" - Display --indent 6 --text "Error: MTU is too low" --result "WARNING" --color RED + Display --indent 6 --text "Error: MTU is too low" --result "${STATUS_WARNING}" --color RED ReportSuggestion "${TEST_NO}" "Check your MTU configuration of IPv6 interfaces" fi @@ -138,7 +138,7 @@ # 0=good, other=bad DNSRESPONSE=`${DIGBINARY} +noall +time=3 +retry=0 @${I} ${I} > /dev/null ; echo $?` if [ "${DNSRESPONSE}" = "0" ]; then - Display --indent 8 --text "Nameserver: ${I}" --result OK --color GREEN + Display --indent 8 --text "Nameserver: ${I}" --result "${STATUS_OK}" --color GREEN LogText "Nameserver ${I} seems to respond to queries from this host." # Count responsive nameservers NUMBERACTIVENS=$((NUMBERACTIVENS + 1)) @@ -151,7 +151,7 @@ fi else LogText "Result: Nameserver test for ${I} skipped, 'dig' not installed" - Display --indent 6 --text "Nameserver: ${I}" --result SKIPPED --color YELLOW + Display --indent 6 --text "Nameserver: ${I}" --result "${STATUS_SKIPPED}" --color YELLOW fi done fi @@ -167,19 +167,19 @@ if [ ${SKIPTEST} -eq 0 ]; then if [ ! "${DIGBINARY}" = "" ]; then if [ ${NUMBERACTIVENS} -lt 2 ]; then - Display --indent 4 --text "- Minimal of 2 responsive nameservers" --result WARNING --color RED + Display --indent 4 --text "- Minimal of 2 responsive nameservers" --result "${STATUS_WARNING}" --color RED LogText "Result: less than 2 responsive nameservers found" ReportWarning ${TEST_NO} "L" "Couldn't find 2 responsive nameservers" LogText "Note: Non responsive nameservers can give problems for your system(s). Like the lack of recursive lookups, bad connectivity to update servers etc." ReportSuggestion ${TEST_NO} "Check your resolv.conf file and fill in a backup nameserver if possible" AddHP 1 2 else - Display --indent 4 --text "- Minimal of 2 responsive nameservers" --result OK --color GREEN + Display --indent 4 --text "- Minimal of 2 responsive nameservers" --result "${STATUS_OK}" --color GREEN LogText "Result: found at least 2 responsive nameservers" AddHP 3 3 fi else - Display --indent 4 --text "- Minimal of 2 responsive nameservers" --result SKIPPED --color YELLOW + Display --indent 4 --text "- Minimal of 2 responsive nameservers" --result "${STATUS_SKIPPED}" --color YELLOW LogText "Result: dig not installed, test can't be fully performed" fi else @@ -201,7 +201,7 @@ LogText "Result: Found default gateway ${I}" Report "default_gateway[]=${I}" done - Display --indent 2 --text "- Checking default gateway" --result DONE --color GREEN + Display --indent 2 --text "- Checking default gateway" --result "${STATUS_DONE}" --color GREEN else LogText "Result: No default gateway found" Display --indent 2 --text "- Checking default gateway" --result "NONE FOUND" --color WHITE @@ -455,9 +455,9 @@ done fi if [ "${FIND}" = "" -a "${FIND2}" = "" ]; then - Display --indent 2 --text "- Getting listening ports (TCP/UDP)" --result SKIPPED --color YELLOW + Display --indent 2 --text "- Getting listening ports (TCP/UDP)" --result "${STATUS_SKIPPED}" --color YELLOW else - Display --indent 2 --text "- Getting listening ports (TCP/UDP)" --result DONE --color GREEN + Display --indent 2 --text "- Getting listening ports (TCP/UDP)" --result "${STATUS_DONE}" --color GREEN Display --indent 6 --text "* Found ${N} ports" fi fi @@ -497,10 +497,10 @@ # Show result if [ ${FOUNDPROMISC} -eq 0 ]; then - Display --indent 2 --text "- Checking promiscuous interfaces" --result OK --color GREEN + Display --indent 2 --text "- Checking promiscuous interfaces" --result "${STATUS_OK}" --color GREEN LogText "Result: No promiscuous interfaces found" else - Display --indent 2 --text "- Checking promiscuous interfaces" --result WARNING --color RED + Display --indent 2 --text "- Checking promiscuous interfaces" --result "${STATUS_WARNING}" --color RED fi fi # @@ -533,10 +533,10 @@ # Show result if [ ${FOUNDPROMISC} -eq 0 ]; then - Display --indent 2 --text "- Checking promiscuous interfaces" --result OK --color GREEN + Display --indent 2 --text "- Checking promiscuous interfaces" --result "${STATUS_OK}" --color GREEN LogText "Result: No promiscuous interfaces found" else - Display --indent 2 --text "- Checking promiscuous interfaces" --result WARNING --color RED + Display --indent 2 --text "- Checking promiscuous interfaces" --result "${STATUS_WARNING}" --color RED fi fi # @@ -576,10 +576,10 @@ if [ "${OPTIONS_CONN_MAX_WAIT_STATE}" = "" ]; then OPTIONS_CONN_MAX_WAIT_STATE="5000"; fi LogText "Result: currently ${FIND} connections are in a waiting state (max configured: ${OPTIONS_CONN_MAX_WAIT_STATE})." if [ ${FIND} -gt ${OPTIONS_CONN_MAX_WAIT_STATE} ]; then - Display --indent 2 --text "- Checking waiting connections" --result WARNING --color YELLOW + Display --indent 2 --text "- Checking waiting connections" --result "${STATUS_WARNING}" --color YELLOW ReportSuggestion "${TEST_NO}" "Determine why system has many connections in WAIT state (${FIND})" else - Display --indent 2 --text "- Checking waiting connections" --result OK --color GREEN + Display --indent 2 --text "- Checking waiting connections" --result "${STATUS_OK}" --color GREEN LogText "Result: ${FIND} connections are in WAIT state" fi fi @@ -592,7 +592,7 @@ if [ ${SKIPTEST} -eq 0 ]; then IsRunning dhclient if [ ${RUNNING} -eq 1 ]; then - Display --indent 2 --text "- Checking status DHCP client" --result RUNNING --color WHITE + Display --indent 2 --text "- Checking status DHCP client" --result "${STATUS_RUNNING}" --color WHITE DHCP_CLIENT_RUNNING=1 else Display --indent 2 --text "- Checking status DHCP client" --result "NOT ACTIVE" --color WHITE @@ -608,9 +608,9 @@ IsRunning arpwatch if [ ${RUNNING} -eq 1 ]; then ARPWATCH_RUNNING=1 - Display --indent 2 --text "- Checking for ARP monitoring software" --result RUNNING --color GREEN + Display --indent 2 --text "- Checking for ARP monitoring software" --result "${STATUS_RUNNING}" --color GREEN else - Display --indent 2 --text "- Checking for ARP monitoring software" --result "NOT FOUND" --color YELLOW + Display --indent 2 --text "- Checking for ARP monitoring software" --result "${STATUS_NOT_FOUND}" --color YELLOW ReportSuggestion ${TEST_NO} "Install ARP monitoring software like arpwatch" fi fi |