diff options
author | mboelen <michael@cisofy.com> | 2014-10-13 21:19:40 +0400 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2014-10-13 21:19:40 +0400 |
commit | 0378677ea92a4d1a6414bd6e109c772aad4e1f96 (patch) | |
tree | e661ee5f94f690da44f93c45e5f84eb1f1dd499a /include | |
parent | 7c067c62c4e79e79e8ae06ee3cef4c2d6e13ae3c (diff) |
Cleanup of test and properly show status of timedated [TIME-3104]
Diffstat (limited to 'include')
-rw-r--r-- | include/tests_time | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/include/tests_time b/include/tests_time index 3d3ff3af..475a5d71 100644 --- a/include/tests_time +++ b/include/tests_time @@ -56,38 +56,29 @@ FOUND=1; NTPD_RUNNING=1; NTP_DAEMON_RUNNING=1; NTP_CONFIG_TYPE_DAEMON=1 NTP_DAEMON="ntpd" logtext "Result: found running NTP daemon in process list" - Display --indent 2 --text "- Checking running NTP daemon (ntpd)" --result FOUND --color GREEN - else - logtext "Result: NTP daemon not found in process list" - Display --indent 2 --text "- Checking running NTP daemon (ntpd)" --result "NOT FOUND" --color WHITE + Display --indent 4 --text "- Daemon: ntpd" --result FOUND --color GREEN fi # Check time daemon (eg NetBSD) IsRunning timed if [ ${RUNNING} -eq 1 ]; then FOUND=1; NTP_DAEMON_RUNNING=1; NTP_CONFIG_TYPE_DAEMON=1; NTP_DAEMON="timed" - Display --indent 2 --text "- Checking running NTP daemon (timed)" --result FOUND --color GREEN - else - Display --indent 2 --text "- Checking running NTP daemon (timed)" --result "NOT FOUND" --color WHITE + Display --indent 4 --text "- Daemon: timed" --result FOUND --color GREEN fi # Check time daemon (eg DragonFly BSD) IsRunning dntpd if [ ${RUNNING} -eq 1 ]; then FOUND=1; NTP_DAEMON_RUNNING=1; NTP_CONFIG_TYPE_DAEMON=1; NTP_DAEMON="dntpd" - Display --indent 2 --text "- Checking running NTP daemon (dntpd)" --result FOUND --color GREEN - else - Display --indent 2 --text "- Checking running NTP daemon (dntpd)" --result "NOT FOUND" --color WHITE + Display --indent 4 --text "- Daemon dntpd" --result FOUND --color GREEN fi # Check timedate daemon (systemd) if [ ! "${TIMEDATECTL}" = "" ]; then FIND=`${TIMEDATECTL} status | grep "NTP enabled: yes"` - if [ "${FIND}" = "" ]; then + if [ ! "${FIND}" = "" ]; then FOUND=1; NTP_DAEMON_RUNNING=1; NTP_CONFIG_TYPE_DAEMON=1; NTP_DAEMON="timedated" - Display --indent 2 --text "- Checking running NTP daemon (timedated)" --result "NOT FOUND" --color WHITE - else - Display --indent 2 --text "- Checking running NTP daemon (timedated)" --result "FOUND" --color GREEN + Display --indent 4 --text "- Daemon: timedated" --result "FOUND" --color GREEN fi fi @@ -99,8 +90,7 @@ logtext "Test: checking for ntpdate or rdate in crontab file ${I}" FIND=`cat ${I} | ${EGREPBINARY} "ntpdate|rdate" | grep -v '^#'` if [ ! "${FIND}" = "" ]; then - FOUND=1; - NTP_CONFIG_TYPE_SCHEDULED=1 + FOUND=1; NTP_CONFIG_TYPE_SCHEDULED=1 Display --indent 2 --text "- Checking NTP client in crontab file (${I})" --result FOUND --color GREEN logtext "Result: found ntpdate or rdate reference in crontab file ${I}" else |