Only show suggestion for ntpdate if ntpd isn't running

This commit is contained in:
mboelen 2015-09-01 17:40:05 +02:00
parent d2aaa9662e
commit 2577caf66d
1 changed files with 4 additions and 2 deletions

View File

@ -164,10 +164,12 @@
FIND=`grep 'ntpdate_enable="YES"' /etc/rc.conf`
if [ ! "${FIND}" = "" ]; then
logtext "Result: ntpdate is enabled in rc.conf"
# Mark system having a NTP client, but remind user to improve it
FOUND=1
NTP_CONFIG_TYPE_STARTUP=1
# Only show suggestion when ntpdate is enabled, however ntpd is not running
if [ ${NTP_DAEMON_RUNNING} -eq 0 ]; then
ReportSuggestion ${TEST_NO} "Although ntpdate is enabled in rc.conf, it is adviced to run it at least daily or use a NTP daemon"
fi
else
logtext "Result: ntpdate is not enabled in rc.conf"
fi