aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2010-02-26 14:34:52 -0500
committerBill Nottingham <notting@redhat.com>2010-02-26 14:34:52 -0500
commit9dd0d96d79b4c3f04161eb9513c8bbcef8aec615 (patch)
tree6bca60a3e5ddb7f4d22ffddb91537c40e324758f
parent28b8c5eaa6baec16f9fb18e301247328f7b77798 (diff)
downloadinitscripts-9dd0d96d79b4c3f04161eb9513c8bbcef8aec615.tar
initscripts-9dd0d96d79b4c3f04161eb9513c8bbcef8aec615.tar.gz
initscripts-9dd0d96d79b4c3f04161eb9513c8bbcef8aec615.tar.bz2
initscripts-9dd0d96d79b4c3f04161eb9513c8bbcef8aec615.tar.xz
initscripts-9dd0d96d79b4c3f04161eb9513c8bbcef8aec615.zip
Check dmraid's return code, to catch 'no raid sets' error. (#568790)
In future dmraid versions, all the errors ('no raid disks', etc.) will return proper error codes, so we can dispense with the string checks as well.
-rwxr-xr-xrc.d/rc.sysinit2
1 files changed, 1 insertions, 1 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 1b6f1428..20ea0586 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -363,7 +363,7 @@ fi
if ! strstr "$cmdline" nodmraid && [ -x /sbin/dmraid ]; then
modprobe dm-mirror >/dev/null 2>&1
dmraidsets=$(LC_ALL=C /sbin/dmraid -s -c -i)
- if [ "$dmraidsets" != "no raid disks" -a "$dmraidsets" != "no block devices found" ]; then
+ if [ "$?" = "0" -a "$dmraidsets" != "no raid disks" -a "$dmraidsets" != "no block devices found" ]; then
for dmname in $dmraidsets; do
if [[ "$dmname" =~ '^isw_.*' ]] && \
! strstr "$cmdline" noiswmd; then