diff options
author | gordon <gordon@FreeBSD.org> | 2002-06-13 22:14:37 +0000 |
---|---|---|
committer | gordon <gordon@FreeBSD.org> | 2002-06-13 22:14:37 +0000 |
commit | 9c5433cb225f7a4e56e87623ea2e4011179553a5 (patch) | |
tree | 3168589e209abd888b033397e3c46dee6131a116 /etc/rc.d/raidframe | |
parent | 50d99cdfecd92f5323a18aa791a5b1cb9d8b7191 (diff) | |
download | FreeBSD-src-9c5433cb225f7a4e56e87623ea2e4011179553a5.zip FreeBSD-src-9c5433cb225f7a4e56e87623ea2e4011179553a5.tar.gz |
Merge in all the changes that Mike Makonnen has been maintaining for a
while. This is only the script pieces, the glue for the build comes next.
Submitted by: Mike Makonnen <makonnen@pacbell.net>
Reviewed by: silence on -current and -hackers
Prodded by: rwatson
Diffstat (limited to 'etc/rc.d/raidframe')
-rwxr-xr-x | etc/rc.d/raidframe | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/etc/rc.d/raidframe b/etc/rc.d/raidframe index 640ad6f..53156dc 100755 --- a/etc/rc.d/raidframe +++ b/etc/rc.d/raidframe @@ -1,6 +1,7 @@ #!/bin/sh # -# $NetBSD: raidframe,v 1.4 2000/05/16 16:54:33 oster Exp $ +# $NetBSD: raidframe,v 1.6 2002/01/27 14:16:33 lukem Exp $ +# $FreeBSD$ # # PROVIDE: disks @@ -13,7 +14,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 +24,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 ) & } |