diff options
-rwxr-xr-x | rc.d/rc.sysinit | 19 |
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 |