diff options
author | seanc <seanc@FreeBSD.org> | 2004-09-14 03:04:50 +0000 |
---|---|---|
committer | seanc <seanc@FreeBSD.org> | 2004-09-14 03:04:50 +0000 |
commit | fe1474f861c4875aa796ae8ea93bfa4d8c4e3d4c (patch) | |
tree | 7edd826a6742e7df852b505297ad0857b00ebec6 /etc/rc.d/ntpdate | |
parent | dcf0d84fcdfee5b1132647f75132bb86285e750e (diff) | |
download | FreeBSD-src-fe1474f861c4875aa796ae8ea93bfa4d8c4e3d4c.zip FreeBSD-src-fe1474f861c4875aa796ae8ea93bfa4d8c4e3d4c.tar.gz |
Stop using ntpdate(1) in our startup procedure. Replace ntpdate(1) with
calls to ntpd -g. ntpd is noticeably slower than ntpdate, but is also more
accurate. This removes the nasty hackery in rc.d/ntpdate that would parse
out ntp servers from /etc/ntp.conf (ntpd knows how to read its own config
file). By default, ntpd *will* sync with its listed time servers. To
turn this off so that ntpd does not sync, ntpd_sync_on_start="NO" can be
added to /etc/rc.conf. If ntpd is not enabled (the default), then time is
not synced on startup. ntpdate has been depreciated by the ntpd authors
for quite some time so this change shouldn't be unexpected.
Suggested by: des
Approved by: roberto (resident ntp guru)
Diffstat (limited to 'etc/rc.d/ntpdate')
-rwxr-xr-x | etc/rc.d/ntpdate | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/etc/rc.d/ntpdate b/etc/rc.d/ntpdate deleted file mode 100755 index 1ef9b61..0000000 --- a/etc/rc.d/ntpdate +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# -# $NetBSD: ntpdate,v 1.8 2002/03/22 04:16:39 lukem Exp $ -# $FreeBSD$ -# - -# PROVIDE: ntpdate -# REQUIRE: NETWORKING syslogd -# KEYWORD: FreeBSD nojail - -. /etc/rc.subr - -name="ntpdate" -rcvar=`set_rcvar` -stop_cmd=":" -start_cmd="ntpdate_start" - -ntpdate_start() -{ - if [ -z "$ntpdate_hosts" -a -f /etc/ntp.conf ]; then - ntpdate_hosts=`awk ' - /^server[ \t]*127.127/ {next} - /^(server|peer)/ {print $2} - ' </etc/ntp.conf` - fi - if [ -n "$ntpdate_hosts" -o -n "$rc_flags" ]; then - echo "Setting date via ntp." - ${ntpdate_command:-ntpdate} $rc_flags $ntpdate_hosts - fi -} - -load_rc_config $name -run_rc_command "$1" |