2000-03-10 14:53:23 +03:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2000-05-16 20:54:33 +04:00
|
|
|
# $NetBSD: raidframe,v 1.4 2000/05/16 16:54:33 oster Exp $
|
2000-03-10 14:53:23 +03:00
|
|
|
#
|
|
|
|
|
2000-04-26 09:13:51 +04:00
|
|
|
# PROVIDE: disks
|
2000-03-10 14:53:23 +03:00
|
|
|
|
|
|
|
. /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
|
2000-05-16 20:54:33 +04:00
|
|
|
|
|
|
|
# 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
|
|
|
|
) &
|
2000-03-10 14:53:23 +03:00
|
|
|
}
|
|
|
|
|
2000-05-13 12:45:06 +04:00
|
|
|
load_rc_config $name
|
2000-03-10 14:53:23 +03:00
|
|
|
run_rc_command "$1"
|