diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-07-13 16:26:14 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-07-13 16:26:14 +0000 |
commit | 1a0791e26125d32be1f8af468780776dfd7fa149 (patch) | |
tree | 24e047a828c413d365ef2c6c39861ae73bce6f28 /etc | |
parent | 41da044f12829b4b3243332df5398440bcca98e3 (diff) |
timed & rdate start before securelevel is set so no need to check
$securelevel; noted by ho@
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc | 4 | ||||
-rw-r--r-- | etc/rc.securelevel | 13 |
2 files changed, 7 insertions, 10 deletions
@@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.147 2000/07/13 13:15:36 itojun Exp $ +# $OpenBSD: rc,v 1.148 2000/07/13 16:26:13 millert Exp $ # System startup script run by init on autoboot # or after single-user. @@ -253,7 +253,7 @@ if [ X${amd} = X"YES" -a -d ${amd_dir} -a -e ${amd_master} ]; then fi # run rdate before timed -if [ $securelevel -le 1 -a X"${rdate_flags}" != X"NO" ]; then +if [ X"${rdate_flags}" != X"NO" ]; then echo -n ' rdate'; rdate -s ${rdate_flags} fi diff --git a/etc/rc.securelevel b/etc/rc.securelevel index 04737b3cbed..ae949dc4912 100644 --- a/etc/rc.securelevel +++ b/etc/rc.securelevel @@ -1,4 +1,4 @@ -# $OpenBSD: rc.securelevel,v 1.13 2000/07/11 22:30:56 matt Exp $ +# $OpenBSD: rc.securelevel,v 1.14 2000/07/13 16:26:13 millert Exp $ # # site-specific startup actions, daemons, and other things which # can be done BEFORE your system goes into securemode. For actions @@ -16,13 +16,10 @@ securelevel=1 echo -n 'starting pre-securelevel daemons:' # Securelevel > 1 does not allow the clock to be set backwards -if [ $securelevel -gt 1 ]; then - if [ X"${ntpdate_flags}" != X"NO" -a -x /usr/local/sbin/ntpdate ]; then - echo -n ' ntpdate' - /usr/local/sbin/ntpdate -b ${ntpdate_flags} >/dev/null - elif [ X"${rdate_flags}" != X"NO" ]; then - echo -n ' rdate'; rdate -s ${rdate_flags} - fi +if [ $securelevel -gt 1 -a X"${ntpdate_flags}" != X"NO" \ + -a -x /usr/local/sbin/ntpdate ]; then + echo -n ' ntpdate' + /usr/local/sbin/ntpdate -b ${ntpdate_flags} >/dev/null fi if [ X"${ntpd}" == X"YES" -a -x /usr/local/sbin/tickadj \ |