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