Do not let a hostname that is contained in "localhost" like "cal" trigger a false positive

This commit is contained in:
Alexander Lobodzinski 2015-09-03 17:20:34 +02:00
parent 235b228fe2
commit e1a87794bc
1 changed files with 1 additions and 1 deletions

View File

@ -587,7 +587,7 @@
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=`cat /etc/hosts | egrep -v '^(#|$)' | egrep '(localhost|^::1\s)' | grep ${HOSTNAME}`
sFIND=`cat /etc/hosts | egrep -v '^(#|$)' | egrep '(localhost|^::1\s)' | grep -w ${HOSTNAME}`
if [ ! "${sFIND}" = "" ]; then
logtext "Result: Found this server hostname mapped to a local address"
Display --indent 4 --text "- Checking /etc/hosts (localhost)" --result SUGGESTION --color YELLOW