Home | History | Annotate | Line # | Download | only in rc.d
sysctl revision 1.10
      1   1.1    lukem #!/bin/sh
      2   1.1    lukem #
      3  1.10  thorpej # $NetBSD: sysctl,v 1.10 2002/03/22 04:34:00 thorpej 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.10  thorpej # BEFORE:  DAEMON
      9   1.1    lukem 
     10   1.1    lukem . /etc/rc.subr
     11   1.1    lukem 
     12   1.1    lukem name="sysctl"
     13   1.1    lukem start_cmd="sysctl_start"
     14   1.1    lukem stop_cmd=":"
     15   1.1    lukem 
     16   1.1    lukem sysctl_start()
     17   1.1    lukem {
     18   1.3   tsarna 	if [ -n "$defcorename" ]; then
     19   1.3   tsarna 		cat <<__EOF__
     20   1.3   tsarna *** WARNING: /etc/rc.conf \$defcorename setting is obsolete. Please
     21   1.3   tsarna *** set kern.defcorename in /etc/sysctl.conf
     22   1.6   tsarna __EOF__
     23   1.3   tsarna 		sysctl -w kern.defcorename=$defcorename
     24   1.4   tsarna 	fi
     25   1.4   tsarna 
     26   1.6   tsarna 	if [ -n "$nfsiod_flags" ]; then
     27   1.4   tsarna 		cat <<__EOF__
     28   1.4   tsarna *** WARNING: /etc/rc.conf \$nfsiod_flags setting is obsolete. Please
     29   1.6   tsarna *** remove it. If it was set to other than the default of "-n 4", then
     30   1.5   tsarna *** set vfs.nfs.iothreads in /etc/sysctl.conf
     31   1.3   tsarna __EOF__
     32   1.3   tsarna 	fi
     33   1.3   tsarna 
     34   1.2   tsarna 	if [ -r /etc/sysctl.conf ]; then
     35   1.2   tsarna 		echo "Setting sysctl variables:"
     36   1.2   tsarna 		sysctl -f /etc/sysctl.conf
     37   1.1    lukem 	fi
     38   1.1    lukem }
     39   1.1    lukem 
     40   1.7    lukem load_rc_config $name
     41   1.1    lukem run_rc_command "$1"
     42