diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-03-17 01:33:51 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-03-17 01:33:51 +0000 |
commit | ebc5f5b292a9c7fb6d7747eb864038b1670a75ce (patch) | |
tree | fc936200b4975e07ca80b62cfcccdfec96ec9715 /etc | |
parent | e1487e1686b6643230cddeedddabc982a801bb80 (diff) |
If you are running securelevel 2, and you do not sync the clock before
switching to that securelevel, and the clock is off by more than
128ms, ntpd will attempt to correct by stepping the clock instead of
slewing it. So use -x in that case; from tholo
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc.local | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/rc.local b/etc/rc.local index 3abafe19cf6..0e7ae7dcf46 100644 --- a/etc/rc.local +++ b/etc/rc.local @@ -1,4 +1,4 @@ -# $OpenBSD: rc.local,v 1.33 2001/06/05 23:01:55 naddy Exp $ +# $OpenBSD: rc.local,v 1.34 2004/03/17 01:33:50 deraadt Exp $ # site-specific startup actions, daemons, and other things which # can be done AFTER your system goes into securemode. For actions @@ -19,7 +19,11 @@ fi if [ X"${ntpd}" == X"YES" -a -x /usr/local/sbin/ntpd \ -a -e /etc/ntp.conf ]; then - echo -n ' ntpd'; /usr/local/sbin/ntpd -p /var/run/ntpd.pid + ntpd_flags="-p /var/run/ntpd.pid" + if [ $securelevel -ge 1 ]; then + ntpd_flags="${ntpdflags} -x" + fi + echo -n ' ntpd'; /usr/local/sbin/ntpd ${ntpd_flags} fi if [ -x /usr/local/sbin/cfsd ]; then |