Simplify setting of securelevel.
This commit is contained in:
parent
62e02b0dad
commit
143d8a9539
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user