From cd45f75d2729c268bc3f1ebe1691749a3b18b09f Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 26 Feb 2010 14:30:28 -0500 Subject: 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. --- rc.d/rc.sysinit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rc.d') diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 324cb5d0..9736e859 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -360,7 +360,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 -- cgit v1.2.1