1#!/bin/sh 2# 3# $FreeBSD$ 4# 5 6# PROVIDE: securelevel 7# REQUIRE: adjkerntz ipfw pf 8 9. /etc/rc.subr 10 11name="securelevel" 12desc="Securelevel configuration" 13rcvar='kern_securelevel_enable' 14start_cmd="securelevel_start" 15stop_cmd=":" 16 17# Last chance to set sysctl variables that failed the first time. 18# 19/etc/rc.d/sysctl lastload 20 21securelevel_start() 22{ 23 if [ ${kern_securelevel} -ge 0 ]; then 24 echo 'Raising kernel security level: ' 25 ${SYSCTL} kern.securelevel=${kern_securelevel} 26 fi 27} 28 29load_rc_config $name 30run_rc_command "$1" 31