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
name="securelevel"
rcvar='kern_securelevel_enable'
start_cmd="securelevel_start"
stop_cmd=":"
# Last chance to set sysctl variables that failed the first time.
#
/etc/rc.d/sysctl lastload
securelevel_start()
{
# Last chance to set sysctl variables that failed the first time.
#
/etc/rc.d/sysctl lastload
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
if [ ${kern_securelevel} -ge 0 ]; then
echo 'Raising kernel security level: '
${SYSCTL_W} kern.securelevel=${kern_securelevel}
fi
}
load_rc_config $name