freebsd-nq/etc/rc.d/securelevel

31 lines
528 B
Plaintext
Raw Normal View History

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: securelevel
2012-08-22 18:35:17 +00:00
# REQUIRE: adjkerntz ipfw ipfilter pf
. /etc/rc.subr
name="securelevel"
desc="Securelevel configuration"
2004-01-17 11:11:18 +00:00
rcvar='kern_securelevel_enable'
start_cmd="securelevel_start"
stop_cmd=":"
2004-01-17 11:11:18 +00:00
# Last chance to set sysctl variables that failed the first time.
#
/etc/rc.d/sysctl lastload
securelevel_start()
{
2004-01-17 11:11:18 +00:00
if [ ${kern_securelevel} -ge 0 ]; then
echo 'Raising kernel security level: '
${SYSCTL} kern.securelevel=${kern_securelevel}
2004-01-17 11:11:18 +00:00
fi
}
load_rc_config $name
run_rc_command "$1"