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