NetBSD/etc/rc.d/raidframeparity
mycroft 7d2e1537c5 Add an _rc_subr_loaded variable, set to ":" by rc.subr. Scripts can use this
for a speedup by doing:
$_rc_subr_loaded . /etc/rc.subr
2004-08-13 18:08:03 +00:00

31 lines
471 B
Bash
Executable File

#!/bin/sh
#
# $NetBSD: raidframeparity,v 1.2 2004/08/13 18:08:03 mycroft Exp $
#
# REQUIRE: quota
$_rc_subr_loaded . /etc/rc.subr
name="raidframeparity"
start_cmd="raidframeparity_start"
stop_cmd=":"
raidframeparity_start()
{
# Initiate parity/mirror reconstruction as needed, in the background.
#
(
for dev in `sysctl -n hw.disknames`; do
case $dev in
raid[0-9]*)
raidctl -P $dev
;;
esac
done
) &
}
load_rc_config $name
run_rc_command "$1"