#!/bin/sh # # $NetBSD: sysctl,v 1.1.1.1 2000/03/10 11:53:24 lukem Exp $ # # PROVIDE: sysctl # REQUIRE: root mountcritremote . /etc/rc.subr . /etc/rc.conf name="sysctl" start_cmd="sysctl_start" stop_cmd=":" sysctl_start() { # if $defcorename is set, change it here. # if [ -n "$defcorename" ]; then echo -n "Setting default core name template: " sysctl -w kern.defcorename=$defcorename fi # if $securelevel is set, change it here, else if it is 0, # change it to 1 here, before we start login services. # if [ -n "$securelevel" ]; then echo -n "Setting securelevel: " sysctl -w kern.securelevel=$securelevel else securelevel=`sysctl -n kern.securelevel` if [ x"$securelevel" = x0 ]; then echo -n "Setting securelevel: " sysctl -w kern.securelevel=1 fi fi } run_rc_command "$1"