Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/etc/rc.d Pull up revision 1.1 (requested by abs in tick...



details:   https://anonhg.NetBSD.org/src/rev/842d49226125
branches:  netbsd-1-6
changeset: 529571:842d49226125
user:      he <he%NetBSD.org@localhost>
date:      Sat Nov 30 14:15:27 2002 +0000

description:
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

diffstat:

 etc/rc.d/raidframeparity |  30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diffs (34 lines):

diff -r f9c7ddac7e32 -r 842d49226125 etc/rc.d/raidframeparity
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/rc.d/raidframeparity  Sat Nov 30 14:15:27 2002 +0000
@@ -0,0 +1,30 @@
+#!/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"



Home | Main Index | Thread Index | Old Index