diff options
Diffstat (limited to 'rc.d')
-rwxr-xr-x | rc.d/init.d/functions | 4 | ||||
-rwxr-xr-x | rc.d/rc.sysinit | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index 521b4d0f..3db40360 100755 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -493,7 +493,7 @@ resolve_dm_name() { ( name="$1" - line=$(/sbin/dmraid -ay -t --ignorelocking | grep -v "No RAID disks" | awk -F ':' "{ if (\$1 ~ /^$name$/) { print \$2; }}") + line=$(/sbin/dmraid -ay -t --ignorelocking | egrep -iv "no block devices found|No RAID disks" | awk -F ':' "{ if (\$1 ~ /^$name$/) { print \$2; }}") newline=$line for x in $line ; do if [[ "$x" =~ "^/dev/" ]] ; then @@ -501,6 +501,6 @@ resolve_dm_name() { newline=$(echo $newline | sed -e "s,$x\( \|$\),$majmin\1,g") fi done - /sbin/dmsetup table | grep -v "No devices found" | sed -n "s/\(^[^:]\+\): $newline\( \+$\|$\)/\1/p" + /sbin/dmsetup table | egrep -iv "no block devices found|No devices found" | sed -n "s/\(^[^:]\+\): $newline\( \+$\|$\)/\1/p" ) 2>/dev/null } diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 8c0d3229..71d5bc79 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -259,7 +259,7 @@ if [ -c /dev/mapper/control ]; then if [ -x /sbin/dmraid ]; then modprobe dm-mirror >/dev/null 2>&1 - for x in $(dmraid -ay -t --ignorelocking 2>/dev/null | grep -v "No RAID disks" | awk -F ':' '{ print $1 }') ; do + for x in $(/sbin/dmraid -ay -t --ignorelocking 2>/dev/null | egrep -iv "no block devices found|No RAID disks" | awk -F ':' '{ print $1 }') ; do dmname=$(resolve_dm_name $x) if [ -z "$dmname" ]; then /sbin/dmraid -ay --ignorelocking "$x" |