raidframe revision 1.4
1#!/bin/sh
2#
3# $NetBSD: raidframe,v 1.4 2000/05/16 16:54:33 oster Exp $
4#
5
6# PROVIDE: disks
7
8. /etc/rc.subr
9
10name="raidframe"
11start_cmd="raidframe_start"
12stop_cmd=":"
13
14raidframe_start()
15{
16	#	Configure raid devices.
17	#
18	for dev in 0 1 2 3; do
19		if [ -f /etc/raid$dev.conf ]; then
20			raidctl -c /etc/raid$dev.conf raid$dev
21		fi
22	done
23
24	# Initiate parity/mirror reconstruction as needed.  
25	# Backgrounded, and sequentially ordered.
26	#
27	(
28		for dev in 0 1 2 3; do
29			if [ -f /etc/raid$dev.conf ]; then
30                        	raidctl -P raid$dev
31			fi
32        	done
33	) &
34}
35
36load_rc_config $name
37run_rc_command "$1"
38