Home | History | Annotate | Line # | Download | only in rc.d
raidframe revision 1.11
      1 #!/bin/sh
      2 #
      3 # $NetBSD: raidframe,v 1.11 2021/08/03 05:15:20 mlelstv Exp $
      4 #
      5 
      6 # PROVIDE: raidframe
      7 # REQUIRE: devpubd
      8 # BEFORE:  DISKS
      9 
     10 $_rc_subr_loaded . /etc/rc.subr
     11 
     12 name="raidframe"
     13 rcvar=$name
     14 start_cmd="raidframe_start"
     15 stop_cmd=":"
     16 
     17 raidframe_start()
     18 {
     19 	# Configure non-auto-configured raid devices.
     20 	# Ensure order by globbing raid[0-9].conf before raid[1-9][0-9].conf.
     21 	#
     22 	for cfg in /etc/raid[0-9].conf /etc/raid[1-9][0-9].conf ; do
     23 		[ ! -f $cfg ] && continue
     24 		dev=${cfg##*/}
     25 		dev=${dev%%.conf}
     26 		raidctl -c $cfg $dev
     27 	done
     28 }
     29 
     30 load_rc_config $name
     31 run_rc_command "$1"
     32