Home | History | Annotate | Line # | Download | only in rc.d
modules revision 1.1.2.2
      1 #!/bin/sh
      2 #
      3 # $NetBSD: modules,v 1.1.2.2 2015/03/26 10:54:35 martin Exp $
      4 #
      5 
      6 # PROVIDE: modules
      7 # BEFORE:  securelevel
      8 
      9 $_rc_subr_loaded . /etc/rc.subr
     10 
     11 name="modules"
     12 rcvar=$name
     13 start_cmd="modules_start"
     14 stop_cmd=":"
     15 
     16 modules_start()
     17 {
     18 	if [ -f /etc/modules.conf ]; then
     19 		echo "Loading modules."
     20 		cat /etc/modules.conf |
     21 		while read -r args; do
     22 			args=${args%%#*}		# strip comments
     23 			test -z "$args" && continue
     24 			/sbin/modload $args
     25 		done
     26 	fi
     27 }
     28 
     29 load_rc_config $name
     30 run_rc_command "$1"
     31