summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/securelevel
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2004-01-17 11:11:18 +0000
committermtm <mtm@FreeBSD.org>2004-01-17 11:11:18 +0000
commit9fe4ef127460bb3c562419ceca7e38abe8b6a0a0 (patch)
tree568d8e72603a049218078c868eac947477ec6fb4 /etc/rc.d/securelevel
parent8943c2aa717f1f67c5f2ecee778919c5f80bc213 (diff)
downloadFreeBSD-src-9fe4ef127460bb3c562419ceca7e38abe8b6a0a0.zip
FreeBSD-src-9fe4ef127460bb3c562419ceca7e38abe8b6a0a0.tar.gz
Simplify setting of securelevel.
Diffstat (limited to 'etc/rc.d/securelevel')
-rwxr-xr-xetc/rc.d/securelevel21
1 files changed, 9 insertions, 12 deletions
diff --git a/etc/rc.d/securelevel b/etc/rc.d/securelevel
index 31e266c..25c2ac5 100755
--- a/etc/rc.d/securelevel
+++ b/etc/rc.d/securelevel
@@ -10,23 +10,20 @@
. /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()
{
- # 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
+ if [ ${kern_securelevel} -ge 0 ]; then
+ echo 'Raising kernel security level: '
+ ${SYSCTL_W} kern.securelevel=${kern_securelevel}
+ fi
}
load_rc_config $name
OpenPOWER on IntegriCloud