1 #!/bin/sh 2 # 3 # $NetBSD: sysctl,v 1.9 2000/08/21 23:31:24 lukem Exp $ 4 # 5 6 # PROVIDE: sysctl 7 # REQUIRE: root ipfilter ipsec 8 9 . /etc/rc.subr 10 11 name="sysctl" 12 start_cmd="sysctl_start" 13 stop_cmd=":" 14 15 sysctl_start() 16 { 17 if [ -n "$defcorename" ]; then 18 cat <<__EOF__ 19 *** WARNING: /etc/rc.conf \$defcorename setting is obsolete. Please 20 *** set kern.defcorename in /etc/sysctl.conf 21 __EOF__ 22 sysctl -w kern.defcorename=$defcorename 23 fi 24 25 if [ -n "$nfsiod_flags" ]; then 26 cat <<__EOF__ 27 *** WARNING: /etc/rc.conf \$nfsiod_flags setting is obsolete. Please 28 *** remove it. If it was set to other than the default of "-n 4", then 29 *** set vfs.nfs.iothreads in /etc/sysctl.conf 30 __EOF__ 31 fi 32 33 if [ -r /etc/sysctl.conf ]; then 34 echo "Setting sysctl variables:" 35 sysctl -f /etc/sysctl.conf 36 fi 37 } 38 39 load_rc_config $name 40 run_rc_command "$1" 41