diff options
Diffstat (limited to 'etc/rc.d/raidframe')
-rwxr-xr-x | etc/rc.d/raidframe | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/etc/rc.d/raidframe b/etc/rc.d/raidframe index 640ad6f..e0a974a 100755 --- a/etc/rc.d/raidframe +++ b/etc/rc.d/raidframe @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: raidframe,v 1.4 2000/05/16 16:54:33 oster Exp $ +# $NetBSD: raidframe,v 1.5 2000/11/17 05:43:46 lukem Exp $ # # PROVIDE: disks @@ -13,7 +13,7 @@ stop_cmd=":" raidframe_start() { - # Configure raid devices. + # Configure non-auto-configured raid devices. # Ensure order by globbing raid[0-9].conf before raid[0-9][0-9].conf. # for cfg in /etc/raid[0-9].conf /etc/raid[0-9][0-9].conf ; do @@ -23,18 +23,15 @@ raidframe_start() raidctl -c $cfg $dev done - # Initiate parity/mirror reconstruction as needed. - # Backgrounded, and sequentially ordered. - # - # XXX: this currently doesn't work for autoconfigured raid devices - # that don't have a corresponding raidN.conf + # Initiate parity/mirror reconstruction as needed, in the background. # ( - for cfg in /etc/raid[0-9].conf /etc/raid[0-9][0-9].conf ; do - [ ! -f $cfg ] && continue - dev=${cfg##*/} - dev=${dev%%.conf} - raidctl -P $dev + for dev in `sysctl -n hw.disknames`; do + case $dev in + raid[0-9]*) + raidctl -P $dev + ;; + esac done ) & } |