Subject: Re: misc/30074: proposed changes to RAIDframe related rc.d scripts
To: None <misc-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Jukka Salmi <j+nbsd@2005.salmi.ch>
List: netbsd-bugs
Date: 04/27/2005 18:14:01
The following reply was made to PR misc/30074; it has been noted by GNATS.

From: Jukka Salmi <j+nbsd@2005.salmi.ch>
To: netbsd-bugs@netbsd.org
Cc: 
Subject: Re: misc/30074: proposed changes to RAIDframe related rc.d scripts
Date: Wed, 27 Apr 2005 20:13:35 +0200

 --UlVJffcvxoiEqYs2
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 j+nbsd@2005.salmi.ch --> netbsd-bugs (2005-04-27 18:12:00 +0000):
 > >Fix:
 > I'll append the patch to this PR ASAP
 
 Here it is.
 
 -- 
 bashian roulette:
 $ ((RANDOM%6)) || rm -rf ~
 
 --UlVJffcvxoiEqYs2
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="RAIDframe-parity_rc.d.patch"
 
 --- src/etc/defaults/rc.conf.orig	2004-10-18 02:24:26.000000000 +0200
 +++ src/etc/defaults/rc.conf	2005-04-22 01:33:19.000000000 +0200
 @@ -89,6 +89,12 @@
  #
  raidframe=YES
  
 +# RAIDframe parity check.
 +#
 +raidframeparity_early=NO	# Set to YES to have parity check done as
 +				# soon as possible and to pause the boot
 +				# process until it completes.
 +
  # Crypto file system.
  #
  cgd=YES
 --- src/etc/rc.d/raidframe.orig	2004-10-18 02:24:27.000000000 +0200
 +++ src/etc/rc.d/raidframe	2005-04-22 01:09:12.000000000 +0200
 @@ -4,6 +4,7 @@
  #
  
  # PROVIDE: disks
 +# BEFORE: raidframeparity1
  
  $_rc_subr_loaded . /etc/rc.subr
  
 --- src/etc/rc.d/raidframeparity.orig	2004-10-18 02:24:27.000000000 +0200
 +++ src/etc/rc.d/raidframeparity	2005-04-22 01:17:45.000000000 +0200
 @@ -9,6 +9,7 @@
  
  name="raidframeparity"
  start_cmd="raidframeparity_start"
 +start_precmd="! checkyesno raidframeparity_early"
  stop_cmd=":"
  
  raidframeparity_start()
 --- /dev/null	2005-04-22 01:33:10.000000000 +0200
 +++ src/etc/rc.d/raidframeparity1	2005-04-22 01:18:03.000000000 +0200
 @@ -0,0 +1,29 @@
 +#!/bin/sh
 +#
 +# $NetBSD$
 +#
 +
 +# PROVIDE: disks raidframeparity1
 +
 +$_rc_subr_loaded . /etc/rc.subr
 +
 +name="raidframeparity1"
 +start_cmd="raidframeparity1_start"
 +start_precmd="checkyesno raidframeparity_early"
 +stop_cmd=":"
 +
 +raidframeparity1_start()
 +{
 +	# Initiate parity/mirror reconstruction as needed
 +	#
 +	for dev in $(sysctl -n hw.disknames); do
 +		case $dev in
 +		raid[0-9]*)
 +			raidctl -v -P $dev
 +			;;
 +		esac
 +	done
 +}
 +
 +load_rc_config $name
 +run_rc_command "$1"
 
 --UlVJffcvxoiEqYs2--