diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 02526b3f6e4..1bd2af7aba4 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -261,6 +261,8 @@ timed_flags="" # Flags to timed (if enabled). ntpdate_enable="NO" # Run ntpdate to sync time on boot (or NO). ntpdate_program="/usr/sbin/ntpdate" # path to ntpdate, if you want a different one. ntpdate_flags="-b" # Flags to ntpdate (if enabled). +ntpdate_config="/etc/ntp.conf" # ntpdate(8) configuration file +ntpdate_hosts="" # Whitespace-separated list of ntpdate(8) servers. ntpd_enable="NO" # Run ntpd Network Time Protocol (or NO). ntpd_program="/usr/sbin/ntpd" # path to ntpd, if you want a different one. ntpd_config="/etc/ntp.conf" # ntpd(8) configuration file diff --git a/etc/rc.d/ntpdate b/etc/rc.d/ntpdate index 84c473419d1..c76f7a0e7f5 100755 --- a/etc/rc.d/ntpdate +++ b/etc/rc.d/ntpdate @@ -16,11 +16,11 @@ start_cmd="ntpdate_start" ntpdate_start() { - if [ -z "$ntpdate_hosts" -a -f /etc/ntp.conf ]; then + if [ -z "$ntpdate_hosts" -a -f ${ntpdate_config} ]; then ntpdate_hosts=`awk ' /^server[ \t]*127.127/ {next} /^(server|peer)/ {print $2} - '