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

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

Revision 1.1.2.2, Sat Nov 30 14:15:27 2002 UTC (21 years, 4 months ago) by he
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Changes since 1.1.2.1: +30 -0 lines

Pull up revision 1.1 (requested by abs in ticket #772):
  Split raidframe parity checking/rebuilding out into
  raidframeparity, which is called after quota, so we don't
  end up with fsck and raidframe parity rebuild taking forever
  after a crash/reboot.
  While here, check for raid[0-9].conf and raid[1-9][0-9].conf
                and not raid[0-9].conf and raid[0-9][0-9].conf

#!/bin/sh
#
# $NetBSD: raidframeparity,v 1.1.2.2 2002/11/30 14:15:27 he Exp $
#

# REQUIRE: quota

. /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"