Fix detecting systemd timedate deamon (#494)

Fix detecting systemd timedate daemon
This commit is contained in:
Shaleen Jain 2017-11-29 20:29:07 +05:30 committed by Michael Boelen
parent 0519b82cba
commit 21b129f947
1 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@
# Check timedate daemon (systemd)
if [ ! -z "${TIMEDATECTL}" ]; then
FIND=$(${TIMEDATECTL} status | ${GREPBINARY} "NTP synchronized: yes")
FIND=$(${TIMEDATECTL} status | ${EGREPBINARY} "(NTP|System clock) synchronized: yes")
if [ ! -z "${FIND}" ]; then
# Check for systemd-timesyncd
if [ -f /etc/systemd/timesyncd.conf ]; then
@ -218,7 +218,7 @@
Register --test-no TIME-3106 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check systemd NTP time synchronization status"
if [ ${SKIPTEST} -eq 0 ]; then
LogText "Test: Check the status of time synchronization via timedatectl"
FIND=$(${TIMEDATECTL} status | ${GREPBINARY} "NTP synchronized: yes")
FIND=$(${TIMEDATECTL} status | ${EGREPBINARY} "(NTP|System clock) synchronized: yes")
if [ -z "${FIND}" ]; then
LogText "Result: time not synchronized via NTP"
ReportSuggestion "${TEST_NO}" "Check timedatectl output. Sychronization via NTP is enabled, but status reflects it is not synchronized"