[TIME-3104] added more logging

This commit is contained in:
Michael Boelen 2018-09-19 13:19:57 +02:00
parent 166f5f92c9
commit f8697db25b
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04
1 changed files with 6 additions and 1 deletions

View File

@ -102,14 +102,19 @@
FIND=$(${TIMEDATECTL} status | ${EGREPBINARY} "(NTP|System clock) synchronized: yes") FIND=$(${TIMEDATECTL} status | ${EGREPBINARY} "(NTP|System clock) synchronized: yes")
if [ ! -z "${FIND}" ]; then if [ ! -z "${FIND}" ]; then
# Check for systemd-timesyncd # Check for systemd-timesyncd
if [ -f /etc/systemd/timesyncd.conf ]; then if [ -f ${ROOTDIR}etc/systemd/timesyncd.conf ]; then
LogText "Result: found ${ROOTDIR}etc/systemd/timesyncd.conf"
FOUND=1; NTP_DAEMON_RUNNING=1; NTP_CONFIG_TYPE_DAEMON=1; NTP_DAEMON="systemd-timesyncd" FOUND=1; NTP_DAEMON_RUNNING=1; NTP_CONFIG_TYPE_DAEMON=1; NTP_DAEMON="systemd-timesyncd"
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
else
LogText "Result: ${ROOTDIR}etc/systemd/timesyncd.conf does not exist"
fi fi
else else
LogText "Result: time sychronization not performed according timedatectl command" LogText "Result: time sychronization not performed according timedatectl command"
fi fi
else
LogText "Result: timedatectl command not available on this system"
fi fi
# Check crontab for OpenBSD/FreeBSD # Check crontab for OpenBSD/FreeBSD