Merge from vendor branch BINUTILS:
[dragonfly.git] / etc / rc.d / securelevel
CommitLineData
9c600e7d
MD
1#!/bin/sh
2#
3# $NetBSD: securelevel,v 1.4 2002/03/22 04:34:00 thorpej Exp $
4# $FreeBSD: src/etc/rc.d/securelevel,v 1.6 2003/05/05 15:38:41 mtm Exp $
221b91ff 5# $DragonFly: src/etc/rc.d/securelevel,v 1.5 2006/10/24 09:24:15 victor Exp $
9c600e7d
MD
6#
7
8# PROVIDE: securelevel
9c600e7d
MD
9
10. /etc/rc.subr
11
12name="securelevel"
13start_cmd="securelevel_start"
14stop_cmd=":"
15
16securelevel_start()
17{
18 # Last chance to set sysctl variables that failed the first time.
19 #
20 /etc/rc.d/sysctl lastload
21
221b91ff
VBD
22 case ${kern_securelevel} in
23 [0-3]*)
283b4f06
RG
24 if [ ${kern_securelevel} -ge 0 ]; then
25 echo 'Raising kernel security level: '
26 ${SYSCTL_W} kern.securelevel=${kern_securelevel}
9c600e7d
MD
27 fi
28 ;;
29 esac
30}
31
32load_rc_config $name
33run_rc_command "$1"