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:
authorMichael Boelen <michael.boelen@cisofy.com>2019-07-26 12:32:48 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-07-26 12:32:48 +0300
commit17137408d29d004e7ec1512ab7e6b7d30ff28ebe (patch)
tree85991b6df7fa8f8d49845b48c43038b049b68121 /include/tests_time
parent8321b986891eae1f928434ea9ac0003ae743ab67 (diff)
Use IsRunning exit code instead of variable
Diffstat (limited to 'include/tests_time')
-rw-r--r--include/tests_time9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/tests_time b/include/tests_time
index 27693236..00245ff2 100644
--- a/include/tests_time
+++ b/include/tests_time
@@ -63,8 +63,7 @@
if [ -f ${FILE} ]; then LogText "result: found chrony configuration: ${FILE}"; CHRONY_CONF_FILE="${FILE}"; fi
done
if [ -n "${CHRONY_CONF_FILE}" ]; then
- IsRunning chronyd
- if [ ${RUNNING} -eq 1 ]; then
+ if IsRunning "chronyd"; then
FOUND=1; NTP_DAEMON_RUNNING=1; NTP_CONFIG_TYPE_DAEMON=1; NTP_DAEMON="chronyd"
Display --indent 2 --text "- NTP daemon found: chronyd" --result "${STATUS_FOUND}" --color GREEN
else
@@ -75,8 +74,7 @@
fi
# Check time daemon (eg DragonFly BSD)
- IsRunning dntpd
- if [ ${RUNNING} -eq 1 ]; then
+ if IsRunning "dntpd"; then
FOUND=1; NTP_DAEMON_RUNNING=1; NTP_CONFIG_TYPE_DAEMON=1; NTP_DAEMON="dntpd"
Display --indent 2 --text "- NTP daemon found: dntpd" --result "${STATUS_FOUND}" --color GREEN
fi
@@ -91,8 +89,7 @@
fi
# Check time daemon (eg NetBSD)
- IsRunning timed
- if [ ${RUNNING} -eq 1 ]; then
+ if IsRunning "timed"; then
FOUND=1; NTP_DAEMON_RUNNING=1; NTP_CONFIG_TYPE_DAEMON=1; NTP_DAEMON="timed"
Display --indent 2 --text "- NTP daemon found: timed" --result "${STATUS_FOUND}" --color GREEN
fi