summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/securelevel
blob: 8bd5ee1a9cd55d41d25e3c9ddd117a7ccf906307 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
#
# $NetBSD: securelevel,v 1.4 2002/03/22 04:34:00 thorpej Exp $
# $FreeBSD$
#

# PROVIDE: securelevel

. /etc/rc.subr

name="securelevel"
rcvar='kern_securelevel_enable'
start_cmd="securelevel_start"
stop_cmd=":"

# Last chance to set sysctl variables that failed the first time.
#
/etc/rc.d/sysctl lastload

securelevel_start()
{
	if [ ${kern_securelevel} -ge 0 ]; then
		echo 'Raising kernel security level: '
		${SYSCTL_W} kern.securelevel=${kern_securelevel}
	fi
}

load_rc_config $name
run_rc_command "$1"
OpenPOWER on IntegriCloud