178344Sobrien#!/bin/sh 278344Sobrien# 398184Sgordon# $FreeBSD: releng/10.3/etc/rc.d/securelevel 239568 2012-08-22 18:35:17Z obrien $ 478344Sobrien# 578344Sobrien 678344Sobrien# PROVIDE: securelevel 7239568Sobrien# REQUIRE: adjkerntz ipfw ipfilter pf 878344Sobrien 978344Sobrien. /etc/rc.subr 1078344Sobrien 1178344Sobrienname="securelevel" 12124624Smtmrcvar='kern_securelevel_enable' 1378344Sobrienstart_cmd="securelevel_start" 1478344Sobrienstop_cmd=":" 1578344Sobrien 16124624Smtm# Last chance to set sysctl variables that failed the first time. 17124624Smtm# 18124624Smtm/etc/rc.d/sysctl lastload 19124624Smtm 2078344Sobriensecurelevel_start() 2178344Sobrien{ 22124624Smtm if [ ${kern_securelevel} -ge 0 ]; then 23124624Smtm echo 'Raising kernel security level: ' 24220153Semaste ${SYSCTL} kern.securelevel=${kern_securelevel} 25124624Smtm fi 2678344Sobrien} 2778344Sobrien 2878344Sobrienload_rc_config $name 2978344Sobrienrun_rc_command "$1" 30