3 # $NetBSD: securelevel,v 1.7 2008/11/12 12:35:52 ad Exp $
7 # REQUIRE: ipnat mountd
10 $_rc_subr_loaded .
/etc
/rc.subr
13 start_cmd
="securelevel_start"
18 # if $securelevel is set higher, change it here, else if
19 # it is 0, change it to 1 here, before we start daemons
22 osecurelevel
=$
(sysctl
-n kern.securelevel
2>&-)
24 echo "Can't set securelevel. (kern.securelevel sysctl not present.)"
28 if [ -n "$securelevel" -a "$securelevel" != "$osecurelevel" ]; then
29 if [ "$securelevel" -lt "$osecurelevel" ]; then
30 echo "Can't lower securelevel."
33 echo -n "Setting securelevel: "
34 sysctl
-w kern.securelevel
=$securelevel
37 if [ "$osecurelevel" = 0 ]; then
38 echo -n "Setting securelevel: "
39 sysctl
-w kern.securelevel
=1