xref: /freebsd/libexec/rc/rc.d/securelevel (revision 66df505066f51e6d8411b966765d828817f88971)
1#!/bin/sh
2#
3# $FreeBSD$
4#
5
6# PROVIDE: securelevel
7# REQUIRE: adjkerntz ipfw pf sysctl_lastload
8
9. /etc/rc.subr
10
11name="securelevel"
12desc="Securelevel configuration"
13rcvar='kern_securelevel_enable'
14start_cmd="securelevel_start"
15stop_cmd=":"
16
17securelevel_start()
18{
19	if [ ${kern_securelevel} -ge 0 ]; then
20		echo 'Raising kernel security level: '
21		${SYSCTL} kern.securelevel=${kern_securelevel}
22	fi
23}
24
25load_rc_config $name
26run_rc_command "$1"
27