aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/rc.sysinit
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2009-05-26 12:31:37 -0400
committerBill Nottingham <notting@redhat.com>2009-05-26 12:31:37 -0400
commitc7f37c0df875621f718e554775658ed2afb73eef (patch)
treecfca04c7abc1dcb045991b437ca383e6edbf735f /rc.d/rc.sysinit
parent65395c0a7906109e1a5b939d1ecec49f792bcff2 (diff)
downloadinitscripts-c7f37c0df875621f718e554775658ed2afb73eef.tar
initscripts-c7f37c0df875621f718e554775658ed2afb73eef.tar.gz
initscripts-c7f37c0df875621f718e554775658ed2afb73eef.tar.bz2
initscripts-c7f37c0df875621f718e554775658ed2afb73eef.tar.xz
initscripts-c7f37c0df875621f718e554775658ed2afb73eef.zip
Fix dmraid partition naming (#501476, <hdegoede@redhat.com>)
Diffstat (limited to 'rc.d/rc.sysinit')
-rwxr-xr-xrc.d/rc.sysinit7
1 files changed, 6 insertions, 1 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index ab66a589..378129dd 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -363,7 +363,12 @@ fi
if ! strstr "$cmdline" nodmraid && [ -x /sbin/dmraid ]; then
modprobe dm-mirror >/dev/null 2>&1
- /sbin/dmraid -ay -i --rm_partitions >/dev/null 2>&1
+ for dmname in $(/sbin/dmraid -ay -i -p -t 2>/dev/null | \
+ egrep -iv "^no " | \
+ awk -F ':' '{ print $1 }') ; do
+ /sbin/dmraid -ay -i --rm_partitions -p "$dmname" >/dev/null 2>&1
+ /sbin/kpartx -a -p p "/dev/mapper/$dmname"
+ done
fi
if [ -x /sbin/lvm ]; then