2002-09-03 19:35:51 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2009-04-16 01:33:57 +04:00
|
|
|
# $NetBSD: raidframeparity,v 1.4 2009/04/15 21:33:57 joerg Exp $
|
2002-09-03 19:35:51 +04:00
|
|
|
#
|
|
|
|
|
2009-04-16 01:33:57 +04:00
|
|
|
# PROVIDE: raidframeparity
|
2002-09-03 19:35:51 +04:00
|
|
|
# REQUIRE: quota
|
|
|
|
|
2004-08-13 22:08:03 +04:00
|
|
|
$_rc_subr_loaded . /etc/rc.subr
|
2002-09-03 19:35:51 +04:00
|
|
|
|
|
|
|
name="raidframeparity"
|
|
|
|
start_cmd="raidframeparity_start"
|
|
|
|
stop_cmd=":"
|
|
|
|
|
|
|
|
raidframeparity_start()
|
|
|
|
{
|
|
|
|
# Initiate parity/mirror reconstruction as needed, in the background.
|
|
|
|
#
|
|
|
|
(
|
2004-10-11 19:00:51 +04:00
|
|
|
for dev in $(sysctl -n hw.disknames); do
|
2002-09-03 19:35:51 +04:00
|
|
|
case $dev in
|
|
|
|
raid[0-9]*)
|
|
|
|
raidctl -P $dev
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
) &
|
|
|
|
}
|
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|