Add support for an ntpdate_hosts variable.
settings: NO: don't run ntpdate on boot DEFAULT:extract a list of hosts from /etc/ntp.conf otherwise, a list of hosts to poll with ntpdate
This commit is contained in:
parent
547d95a029
commit
36b2c99667
13
etc/rc
13
etc/rc
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: rc,v 1.74 1997/04/23 01:24:22 perry Exp $
|
||||
# $NetBSD: rc,v 1.75 1997/04/27 23:17:56 perry Exp $
|
||||
# originally from: @(#)rc 8.2 (Berkeley) 3/17/94
|
||||
|
||||
# System startup script run by init on autoboot
|
||||
|
@ -311,6 +311,17 @@ if [ "$timed_flags" != NO ]; then
|
|||
echo -n ' timed'; timed $timed_flags
|
||||
fi
|
||||
|
||||
if [ "$ntpdate_hosts" != NO ]; then
|
||||
if [ "$ntpdate_hosts" = DEFAULT ]; then
|
||||
ntpdate_hosts=`awk '/^server/ {print $2}' </etc/ntp.conf`
|
||||
fi
|
||||
|
||||
if [ -n "$ntpdate_hosts" ]; then
|
||||
echo -n 'ntpdate:'
|
||||
ntpdate -b $ntpdate_hosts
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$xntpd_flags" != NO ]; then
|
||||
if [ "$xntpd_flags" = DEFAULT ]; then
|
||||
xntpd_flags=""
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: rc.conf,v 1.9 1997/04/23 01:24:23 perry Exp $
|
||||
# $NetBSD: rc.conf,v 1.10 1997/04/27 23:17:58 perry Exp $
|
||||
#
|
||||
# see rc.conf(5) for more information.
|
||||
|
||||
|
@ -29,6 +29,7 @@ portmap=YES # YES or NO; normally required.
|
|||
update_flags=DEFAULT # default: "30"
|
||||
syslogd_flags=DEFAULT # default: ""
|
||||
timed_flags=NO # default: ""
|
||||
ntpdate_hosts=NO # default: extract from /etc/ntp.conf
|
||||
xntpd_flags=NO # default: ""
|
||||
sendmail_flags=NO # default: "-bd -q30m"
|
||||
named_flags=NO # default: ""
|
||||
|
|
Loading…
Reference in New Issue