mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-28 05:55:27 +01:00
86fdaae573
This is a further clean up after r202988. SYSCTL_W is still initialized in rc.subr as some ports may still use it.
29 lines
457 B
Bash
Executable File
29 lines
457 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: securelevel
|
|
|
|
. /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()
|
|
{
|
|
if [ ${kern_securelevel} -ge 0 ]; then
|
|
echo 'Raising kernel security level: '
|
|
${SYSCTL} kern.securelevel=${kern_securelevel}
|
|
fi
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|