diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2019-07-26 12:32:48 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2019-07-26 12:32:48 +0300 |
commit | 17137408d29d004e7ec1512ab7e6b7d30ff28ebe (patch) | |
tree | 85991b6df7fa8f8d49845b48c43038b049b68121 /include/tests_nameservices | |
parent | 8321b986891eae1f928434ea9ac0003ae743ab67 (diff) |
Use IsRunning exit code instead of variable
Diffstat (limited to 'include/tests_nameservices')
-rw-r--r-- | include/tests_nameservices | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/include/tests_nameservices b/include/tests_nameservices index 4b4b1ac8..fc07eeb8 100644 --- a/include/tests_nameservices +++ b/include/tests_nameservices @@ -215,8 +215,7 @@ Register --test-no NAME-4032 --weight L --network NO --category security --description "Check nscd status" if [ ${SKIPTEST} -eq 0 ]; then LogText "Test: checking nscd status" - IsRunning nscd - if [ ${RUNNING} -eq 1 ]; then + if IsRunning "nscd"; then NAME_CACHE_USED=1 LogText "Result: nscd is running" Display --indent 2 --text "- Checking nscd status" --result "${STATUS_RUNNING}" --color GREEN @@ -233,8 +232,7 @@ Register --test-no NAME-4034 --weight L --network NO --category security --description "Check Unbound status" if [ ${SKIPTEST} -eq 0 ]; then LogText "Test: checking Unbound (unbound) status" - IsRunning unbound - if [ ${RUNNING} -eq 1 ]; then + if IsRunning "unbound"; then UNBOUND_RUNNING=1 NAME_CACHE_USED=1 LogText "Result: Unbound daemon is running" @@ -278,8 +276,7 @@ Register --test-no NAME-4202 --weight L --network NO --category security --description "Check BIND status" if [ ${SKIPTEST} -eq 0 ]; then LogText "Test: Checking for running BIND instance" - IsRunning named - if [ ${RUNNING} -eq 1 ]; then + if IsRunning "named"; then LogText "Result: found BIND process" Display --indent 2 --text "- Checking BIND status" --result "${STATUS_FOUND}" --color GREEN BIND_RUNNING=1 @@ -384,8 +381,7 @@ Register --test-no NAME-4230 --weight L --network NO --category security --description "Check PowerDNS status" if [ ${SKIPTEST} -eq 0 ]; then LogText "Test: Checking for running PowerDNS instance" - IsRunning pdns_server - if [ ${RUNNING} -eq 1 ]; then + if IsRunning "pdns_server"; then LogText "Result: found PowerDNS process" Display --indent 2 --text "- Checking PowerDNS status" --result "${STATUS_RUNNING}" --color GREEN POWERDNS_RUNNING=1 @@ -481,13 +477,11 @@ Register --test-no NAME-4304 --weight L --network NO --category security --description "Check NIS ypbind status" if [ ${SKIPTEST} -eq 0 ]; then LogText "Test: Checking status of ypbind daemon" - IsRunning ypbind - if [ ${RUNNING} -eq 1 ]; then + if IsRunning "ypbind"; then LogText "Result: ypbind is running" Display --indent 2 --text "- Checking ypbind status" --result "${STATUS_FOUND}" --color GREEN YPBIND_RUNNING=1 - IsRunning ypldap - if [ ${RUNNING} -eq 1 ]; then + if IsRunning "ypldap"; then LogText "Result: ypldap is running" Display --indent 2 --text "- Checking ypldap status" --result "${STATUS_FOUND}" --color GREEN else |