diff options
| author | Florent Thoumie <flz@FreeBSD.org> | 2006-07-20 10:07:34 +0000 |
|---|---|---|
| committer | Florent Thoumie <flz@FreeBSD.org> | 2006-07-20 10:07:34 +0000 |
| commit | ca3a4056adcc2e14441f046f77a2ce4f8d5396c3 (patch) | |
| tree | 1446f4b272688a1375b6b5b4c5f6b25a685f6289 /etc | |
| parent | a68654e6474b398bd78cce6a2fde7b8adf647f20 (diff) | |
Notes
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/defaults/rc.conf | 2 | ||||
| -rwxr-xr-x | etc/rc.d/ntpdate | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 02526b3f6e4e..1bd2af7aba4f 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 84c473419d17..c76f7a0e7f54 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} - ' </etc/ntp.conf` + ' < ${ntpdate_config}` fi if [ -n "$ntpdate_hosts" -o -n "$rc_flags" ]; then echo "Setting date via ntp." |
