diff options
author | mboelen <michael@cisofy.com> | 2014-09-19 02:56:51 +0400 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2014-09-19 02:56:51 +0400 |
commit | 94387348f0b4032a8f0060f3c85b356e3a8044c9 (patch) | |
tree | 91227ae6fa6ff7a4ab610662f3b65f34a8b37500 /include/tests_nameservices | |
parent | a145b0091abef438d1ae03fbe0830df9f514ca98 (diff) |
Generic code enhancements
Diffstat (limited to 'include/tests_nameservices')
-rw-r--r-- | include/tests_nameservices | 16 |
1 files 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 |