From 94387348f0b4032a8f0060f3c85b356e3a8044c9 Mon Sep 17 00:00:00 2001 From: mboelen Date: Fri, 19 Sep 2014 00:56:51 +0200 Subject: [PATCH] Generic code enhancements --- include/tests_nameservices | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/tests_nameservices b/include/tests_nameservices index e58124c4..c714e287 100644 --- a/include/tests_nameservices +++ b/include/tests_nameservices @@ -225,8 +225,8 @@ Register --test-no NAME-4032 --weight L --network NO --description "Check nscd status" if [ ${SKIPTEST} -eq 0 ]; then logtext "Test: checking nscd status" - FIND=`${PSBINARY} ax | grep "nscd" | grep -v "grep"` - if [ ! "${FIND}" = "" ]; then + IsRunning nscd + if [ ${RUNNING} -eq 1 ]; then logtext "Result: nscd is running" Display --indent 2 --text "- Checking nscd status" --result RUNNING --color GREEN else @@ -243,8 +243,8 @@ Register --test-no NAME-4202 --weight L --network NO --description "Check BIND status" if [ ${SKIPTEST} -eq 0 ]; then logtext "Test: Checking for running BIND instance" - FIND=`${PSBINARY} ax | grep "/named" | grep -v "grep"` - if [ ! "${FIND}" = "" ]; then + IsRunning named + if [ ${RUNNING} -eq 1 ]; then logtext "Result: found BIND process" Display --indent 2 --text "- Checking BIND status" --result "FOUND" --color GREEN BIND_RUNNING=1 @@ -357,8 +357,8 @@ Register --test-no NAME-4230 --weight L --network NO --description "Check PowerDNS status" if [ ${SKIPTEST} -eq 0 ]; then logtext "Test: Checking for running PowerDNS instance" - FIND=`${PSBINARY} ax | grep "/pdns_server" | grep -v "grep"` - if [ ! "${FIND}" = "" ]; then + IsRunning pdns_server + if [ ${RUNNING} -eq 1 ]; then logtext "Result: found PowerDNS process" Display --indent 2 --text "- Checking PowerDNS status" --result "RUNNING" --color GREEN POWERDNS_RUNNING=1 @@ -455,8 +455,8 @@ Register --test-no NAME-4304 --weight L --network NO --description "Check NIS ypbind status" if [ ${SKIPTEST} -eq 0 ]; then logtext "Test: Checking status of ypbind daemon" - FIND=`${PSBINARY} ax | grep "ypbind" | grep -v "grep"` - if [ ! "${FIND}" = "" ]; then + IsRunning ypbind + if [ ${RUNNING} -eq 1 ]; then logtext "Result: ypbind is running" Display --indent 2 --text "- Checking ypbind status" --result "FOUND" --color GREEN YPBIND_RUNNING=1