[BACK]Return to rc.securelevel CVS log [TXT][DIR] Up to [local] / src / etc

File: [local] / src / etc / Attic / rc.securelevel (download)

Revision 1.13, Tue Jul 11 22:30:56 2000 UTC (23 years, 11 months ago) by matt
Branch: MAIN
Changes since 1.12: +13 -6 lines

- Move ntpd out of rc.securelevel
- Add ntpdate and rdate rc knobs

Approved-And-Assisted-By: millert

#	$OpenBSD: rc.securelevel,v 1.13 2000/07/11 22:30:56 matt Exp $
#
# site-specific startup actions, daemons, and other things which
# can be done BEFORE your system goes into securemode.  For actions
# which should be done AFTER your system has gone into securemode
# please see /etc/rc.local

# This is the desired security level
# XXX
# XXX it is not really acceptable to put this value in a configuration
# XXX file, because locking it down requires immutability on about
# XXX 5 files instead of 2 (the kernel and init)
# XXX
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
fi

if [ X"${ntpd}" == X"YES" -a -x /usr/local/sbin/tickadj \
    -a -e /etc/ntp.conf ]; then
       echo -n ' tickadj';	/usr/local/sbin/tickadj -Aq
fi

echo '.'