freebsd-skq/etc/rc.d/securelevel

34 lines
578 B
Plaintext
Raw Normal View History

#!/bin/sh
#
# $NetBSD: securelevel,v 1.4 2002/03/22 04:34:00 thorpej Exp $
# $FreeBSD$
#
# PROVIDE: securelevel
# KEYWORD: FreeBSD
. /etc/rc.subr
name="securelevel"
start_cmd="securelevel_start"
stop_cmd=":"
securelevel_start()
{
# Last chance to set sysctl variables that failed the first time.
#
/etc/rc.d/sysctl lastload
case ${kern_securelevel_enable} in
[Yy][Ee][Ss])
if [ ${kern_securelevel} -ge 0 ]; then
echo 'Raising kernel security level: '
${SYSCTL_W} kern.securelevel=${kern_securelevel}
fi
;;
esac
}
load_rc_config $name
run_rc_command "$1"