[TIME-3104] Changed timedatectl test

This commit is contained in:
Michael Boelen 2016-09-05 19:48:23 +02:00
parent 01c687eb55
commit 1a832476bb
1 changed files with 4 additions and 4 deletions

View File

@ -70,7 +70,7 @@
fi fi
# Check running processes # 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 if [ ! "${FIND}" = "" ]; then
FOUND=1; NTPD_RUNNING=1; NTP_DAEMON_RUNNING=1; NTP_CONFIG_TYPE_DAEMON=1 FOUND=1; NTPD_RUNNING=1; NTP_DAEMON_RUNNING=1; NTP_CONFIG_TYPE_DAEMON=1
NTP_DAEMON="ntpd" NTP_DAEMON="ntpd"
@ -86,8 +86,8 @@
fi fi
# Check timedate daemon (systemd) # Check timedate daemon (systemd)
if [ ! "${TIMEDATECTL}" = "" ]; then if [ ! -z "${TIMEDATECTL}" ]; then
FIND=`${TIMEDATECTL} status | ${GREPBINARY} "NTP enabled: yes"` FIND=$(${TIMEDATECTL} status | ${GREPBINARY} "NTP synchronized: yes")
if [ ! "${FIND}" = "" ]; then if [ ! "${FIND}" = "" ]; then
# Check for systemd-timesyncd # Check for systemd-timesyncd
if [ -f /etc/systemd/timesyncd.conf ]; then 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 Display --indent 2 --text "- NTP daemon found: systemd (timesyncd)" --result "${STATUS_FOUND}" --color GREEN
SYSTEMD_NTP_ENABLED=1 SYSTEMD_NTP_ENABLED=1
fi fi
else else
LogText "Result: time sychronization not performed according timedatectl command" LogText "Result: time sychronization not performed according timedatectl command"
fi fi
fi fi