[BACK]Return to raidframe CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / etc / rc.d

File: [cvs.NetBSD.org] / src / etc / rc.d / raidframe (download)

Revision 1.4, Tue May 16 16:54:33 2000 UTC (23 years, 11 months ago) by oster
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5, minoura-xpg4dl-base, minoura-xpg4dl
Changes since 1.3: +12 -1 lines

At boot, initiate parity/mirror reconstruction as required.
This operation is backgrounded, and sequentially ordered.

#!/bin/sh
#
# $NetBSD: raidframe,v 1.4 2000/05/16 16:54:33 oster Exp $
#

# PROVIDE: disks

. /etc/rc.subr

name="raidframe"
start_cmd="raidframe_start"
stop_cmd=":"

raidframe_start()
{
	#	Configure raid devices.
	#
	for dev in 0 1 2 3; do
		if [ -f /etc/raid$dev.conf ]; then
			raidctl -c /etc/raid$dev.conf raid$dev
		fi
	done

	# Initiate parity/mirror reconstruction as needed.  
	# Backgrounded, and sequentially ordered.
	#
	(
		for dev in 0 1 2 3; do
			if [ -f /etc/raid$dev.conf ]; then
                        	raidctl -P raid$dev
			fi
        	done
	) &
}

load_rc_config $name
run_rc_command "$1"