xref: /freebsd/libexec/rc/rc.d/securelevel (revision f99f0ee14e3af81c23150a6a340259ca8a33d01a)
10696600cSBjoern A. Zeeb#!/bin/sh
20696600cSBjoern A. Zeeb#
30696600cSBjoern A. Zeeb#
40696600cSBjoern A. Zeeb
50696600cSBjoern A. Zeeb# PROVIDE: securelevel
6f4b38c36SEugene Grosbein# REQUIRE: adjkerntz ipfw pf sysctl_lastload
70696600cSBjoern A. Zeeb
80696600cSBjoern A. Zeeb. /etc/rc.subr
90696600cSBjoern A. Zeeb
100696600cSBjoern A. Zeebname="securelevel"
110696600cSBjoern A. Zeebdesc="Securelevel configuration"
120696600cSBjoern A. Zeebrcvar='kern_securelevel_enable'
130696600cSBjoern A. Zeebstart_cmd="securelevel_start"
140696600cSBjoern A. Zeebstop_cmd=":"
150696600cSBjoern A. Zeeb
160696600cSBjoern A. Zeebsecurelevel_start()
170696600cSBjoern A. Zeeb{
180696600cSBjoern A. Zeeb	if [ ${kern_securelevel} -ge 0 ]; then
190696600cSBjoern A. Zeeb		echo 'Raising kernel security level: '
200696600cSBjoern A. Zeeb		${SYSCTL} kern.securelevel=${kern_securelevel}
210696600cSBjoern A. Zeeb	fi
220696600cSBjoern A. Zeeb}
230696600cSBjoern A. Zeeb
240696600cSBjoern A. Zeebload_rc_config $name
25*f99f0ee1SAlexander Leidinger
26*f99f0ee1SAlexander Leidinger# doesn't make sense to run in a svcj: config setting
27*f99f0ee1SAlexander Leidingersecurelevel_svcj="NO"
28*f99f0ee1SAlexander Leidinger
290696600cSBjoern A. Zeebrun_rc_command "$1"
30