From bd833057e1d8af55ea3ff2e4658d7a867b69d685 Mon Sep 17 00:00:00 2001 From: mboelen Date: Sat, 12 Mar 2016 19:08:23 +0100 Subject: NAME-4406: adjusted filter for localhost detection + logging --- include/tests_nameservices | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/tests_nameservices b/include/tests_nameservices index 4115f678..6865da73 100644 --- a/include/tests_nameservices +++ b/include/tests_nameservices @@ -640,9 +640,10 @@ Register --test-no NAME-4406 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check server hostname mapping" if [ ${SKIPTEST} -eq 0 ]; then LogText "Test: Check server hostname not locally mapped in /etc/hosts" - sFIND=`egrep -v '^(#|$)' /etc/hosts | egrep '(localhost|^::1\s)' | grep -w ${HOSTNAME}` + sFIND=`egrep -v '^(#|$)' /etc/hosts | egrep '^(localhost|::1)\s' | grep -w ${HOSTNAME}` if [ ! "${sFIND}" = "" ]; then LogText "Result: Found this server hostname mapped to a local address" + LogText "Output: ${sFIND}" Display --indent 4 --text "- Checking /etc/hosts (localhost)" --result SUGGESTION --color YELLOW LogText "Information: Linking the hostname to the localhost entry may break some resolving. Split resolving so that localhost resolves back to 127.0.0.1 (and ::1) and the hostname of the machine to the real IP address on the network interface." ReportSuggestion ${TEST_NO} "Split resolving between localhost and the hostname of the system" -- cgit v1.2.3