diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2016-09-05 20:48:23 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-09-05 20:48:23 +0300 |
commit | 1a832476bb14450a85f3e630296c9981802306e5 (patch) | |
tree | 52d372cb2811454cc0109a98b09cfc19b25285e3 /include/tests_time | |
parent | 01c687eb55be18e38a4c6ccc995afa1ad1df788e (diff) |
[TIME-3104] Changed timedatectl test
Diffstat (limited to 'include/tests_time')
-rw-r--r-- | include/tests_time | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/tests_time b/include/tests_time index 0599c19e..28a1b68c 100644 --- a/include/tests_time +++ b/include/tests_time @@ -70,7 +70,7 @@ fi # Check running processes - FIND=`${PSBINARY} ax | ${GREPBINARY} "ntpd" | ${GREPBINARY} -v "dntpd" | ${GREPBINARY} -v "grep"` + FIND=$(${PSBINARY} ax | ${GREPBINARY} "ntpd" | ${GREPBINARY} -v "dntpd" | ${GREPBINARY} -v "grep") if [ ! "${FIND}" = "" ]; then FOUND=1; NTPD_RUNNING=1; NTP_DAEMON_RUNNING=1; NTP_CONFIG_TYPE_DAEMON=1 NTP_DAEMON="ntpd" @@ -86,8 +86,8 @@ fi # Check timedate daemon (systemd) - if [ ! "${TIMEDATECTL}" = "" ]; then - FIND=`${TIMEDATECTL} status | ${GREPBINARY} "NTP enabled: yes"` + if [ ! -z "${TIMEDATECTL}" ]; then + FIND=$(${TIMEDATECTL} status | ${GREPBINARY} "NTP synchronized: yes") if [ ! "${FIND}" = "" ]; then # Check for systemd-timesyncd if [ -f /etc/systemd/timesyncd.conf ]; then @@ -95,7 +95,7 @@ Display --indent 2 --text "- NTP daemon found: systemd (timesyncd)" --result "${STATUS_FOUND}" --color GREEN SYSTEMD_NTP_ENABLED=1 fi - else + else LogText "Result: time sychronization not performed according timedatectl command" fi fi |