Check if hostname is set for NAME-4404 and NAME-4404 tests

This commit is contained in:
mboelen 2014-12-05 17:11:34 +01:00
parent 40e93c9b45
commit 3802a934c6
1 changed files with 4 additions and 2 deletions

View File

@ -561,7 +561,8 @@
# #
# Test : NAME-4404 # Test : NAME-4404
# Description : Check /etc/hosts contains an entry for this server name # Description : Check /etc/hosts contains an entry for this server name
Register --test-no NAME-4404 --weight L --network NO --description "Check /etc/hosts contains an entry for this server name" if [ ! "${HOSTNAME}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no NAME-4404 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check /etc/hosts contains an entry for this server name"
if [ ${SKIPTEST} -eq 0 ]; then if [ ${SKIPTEST} -eq 0 ]; then
logtext "Test: Check /etc/hosts contains an entry for this server name" logtext "Test: Check /etc/hosts contains an entry for this server name"
if [ -f /etc/hosts ]; then if [ -f /etc/hosts ]; then
@ -582,7 +583,8 @@
# #
# Test : NAME-4406 # Test : NAME-4406
# Description : Check server hostname mapping # Description : Check server hostname mapping
Register --test-no NAME-4406 --weight L --network NO --description "Check server hostname mapping" if [ ! "${HOSTNAME}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no NAME-4406 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check server hostname mapping"
if [ ${SKIPTEST} -eq 0 ]; then if [ ${SKIPTEST} -eq 0 ]; then
logtext "Test: Check server hostname not locally mapped in /etc/hosts" logtext "Test: Check server hostname not locally mapped in /etc/hosts"
sFIND=`cat /etc/hosts | egrep -v '^(#|$)' | egrep '(localhost|::1)' | grep ${HOSTNAME}` sFIND=`cat /etc/hosts | egrep -v '^(#|$)' | egrep '(localhost|::1)' | grep ${HOSTNAME}`