diff options
author | flz <flz@FreeBSD.org> | 2006-07-20 10:07:34 +0000 |
---|---|---|
committer | flz <flz@FreeBSD.org> | 2006-07-20 10:07:34 +0000 |
commit | 146016a7bbcca247253eb45157e1454f61dd304a (patch) | |
tree | 1446f4b272688a1375b6b5b4c5f6b25a685f6289 /etc/rc.d/ntpdate | |
parent | 7d273f184492bc4d089b169be21e8e9e38ae77f4 (diff) | |
download | FreeBSD-src-146016a7bbcca247253eb45157e1454f61dd304a.zip FreeBSD-src-146016a7bbcca247253eb45157e1454f61dd304a.tar.gz |
- Remove hardcoded /etc/ntp.conf configuration file from ntpdate rc.d script
and replace it with a new ntpdate_config variable.
- Document it in defaults/rc.conf and rc.conf.5.
- Document ntpdate_hosts in defaults/rc.conf.
Requested by: Chris Timmons <cwt@networks.cwu.edu>
Approved by: cperciva (mentor, implicit)
MFC after: 1 week
Diffstat (limited to 'etc/rc.d/ntpdate')
-rwxr-xr-x | etc/rc.d/ntpdate | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/rc.d/ntpdate b/etc/rc.d/ntpdate index 84c4734..c76f7a0 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." |