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