aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2009-10-09 16:18:04 -0400
committerBill Nottingham <notting@redhat.com>2009-10-09 16:18:04 -0400
commit383fc9e4ed80c339339a91feeb3736ff637e84b8 (patch)
tree6a7d45fa20952ea3620afb35c85ced8e492e8cdc /rc.d
parente6ab19df852dee75fff78dadfc701bc8de18bebf (diff)
downloadinitscripts-383fc9e4ed80c339339a91feeb3736ff637e84b8.tar
initscripts-383fc9e4ed80c339339a91feeb3736ff637e84b8.tar.gz
initscripts-383fc9e4ed80c339339a91feeb3736ff637e84b8.tar.bz2
initscripts-383fc9e4ed80c339339a91feeb3736ff637e84b8.tar.xz
initscripts-383fc9e4ed80c339339a91feeb3736ff637e84b8.zip
dmraid can return 'no raid disks' to stdout. Handle it. (#527726, <mschmidt@redhat.com>)
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/rc.sysinit19
1 files changed, 11 insertions, 8 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index f0dc35d7..a243d8bd 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -362,14 +362,17 @@ fi
if ! strstr "$cmdline" nodmraid && [ -x /sbin/dmraid ]; then
modprobe dm-mirror >/dev/null 2>&1
- for dmname in $(/sbin/dmraid -s -c -i); do
- if [[ "$dmname" =~ '^isw_.*' ]] && \
- ! strstr "$cmdline" noiswmd; then
- continue
- fi
- /sbin/dmraid -ay -i --rm_partitions -p "$dmname" >/dev/null 2>&1
- /sbin/kpartx -a -p p "/dev/mapper/$dmname"
- done
+ dmraidsets=$(LC_ALL=C /sbin/dmraid -s -c -i)
+ if [ "$dmraidsets" != "no raid disks" ]; then
+ for dmname in $dmraidsets; do
+ if [[ "$dmname" =~ '^isw_.*' ]] && \
+ ! strstr "$cmdline" noiswmd; then
+ continue
+ fi
+ /sbin/dmraid -ay -i --rm_partitions -p "$dmname" >/dev/null 2>&1
+ /sbin/kpartx -a -p p "/dev/mapper/$dmname"
+ done
+ fi
fi
if [ -x /sbin/lvm ]; then