Simplify setting of securelevel.

This commit is contained in:
mtm 2004-01-17 11:11:18 +00:00
parent b9ba2f479b
commit 9479a80b1a

View File

@ -10,23 +10,20 @@
. /etc/rc.subr . /etc/rc.subr
name="securelevel" name="securelevel"
rcvar='kern_securelevel_enable'
start_cmd="securelevel_start" start_cmd="securelevel_start"
stop_cmd=":" stop_cmd=":"
# Last chance to set sysctl variables that failed the first time.
#
/etc/rc.d/sysctl lastload
securelevel_start() securelevel_start()
{ {
# Last chance to set sysctl variables that failed the first time. if [ ${kern_securelevel} -ge 0 ]; then
# echo 'Raising kernel security level: '
/etc/rc.d/sysctl lastload ${SYSCTL_W} kern.securelevel=${kern_securelevel}
fi
case ${kern_securelevel_enable} in
[Yy][Ee][Ss])
if [ ${kern_securelevel} -ge 0 ]; then
echo 'Raising kernel security level: '
${SYSCTL_W} kern.securelevel=${kern_securelevel}
fi
;;
esac
} }
load_rc_config $name load_rc_config $name