Simplify setting of securelevel.

This commit is contained in:
Mike Makonnen 2004-01-17 11:11:18 +00:00
parent 62e02b0dad
commit 143d8a9539

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