Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormboelen <michael@cisofy.com>2014-09-19 02:56:51 +0400
committermboelen <michael@cisofy.com>2014-09-19 02:56:51 +0400
commit94387348f0b4032a8f0060f3c85b356e3a8044c9 (patch)
tree91227ae6fa6ff7a4ab610662f3b65f34a8b37500
parenta145b0091abef438d1ae03fbe0830df9f514ca98 (diff)
Generic code enhancements
-rw-r--r--include/tests_nameservices16
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