aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rc.d/init.d/functions30
-rwxr-xr-xrc.d/rc.sysinit9
2 files changed, 1 insertions, 38 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index bb580486..37ec2865 100644
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -542,36 +542,6 @@ get_numeric_dev() {
) 2>/dev/null
}
-# find the working name for a running dm device with the same table as one
-# that dmraid would create
-resolve_dm_name() {
-(
- name="$1"
-
- line=$(/sbin/dmraid -ay -t --ignorelocking | \
- egrep -iv "no block devices found|No RAID disks" | \
- awk -F ':' "{ if (\$1 ~ /^$name$/) { print \$2; }}")
- for x in $line ; do
- if [[ "$x" =~ ^/dev/ ]] ; then
- majmin=$(get_numeric_dev dec $x)
- line=$(echo "$line" | sed -e "s,$x\( \|$\),$majmin\1,g")
- fi
- done
- line=$(echo "$line" | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' \
- -e 's/ core [12] [[:digit:]]\+ / core [12] [[:digit:]]\\+ /')
- # XXX PJFIX -- this method of handling extra parameters is really just
- # asking for failure -- the better way would be to make
- # dmsetup or dmraid be able to do resolve_dm_name for us.
- if [ "$(echo $line | awk '{ print $3 }')" == "mirror" ]; then
- line=$(echo "$line" | sed \
- -e 's/ 1 [[:alpha:]][[:alnum:]_]\+$/\\($\\|&$\\)/')
- fi
- /sbin/dmsetup table | \
- sed -n -e "s/.*\(no block devices found\|No devices found\).*//" \
- -e "s/\(^[^:]\+\): $line\( \+$\|$\)/\1/p"
-) 2>/dev/null
-}
-
# Check whether file $1 is a backup or rpm-generated file and should be ignored
is_ignored_file() {
case "$1" in
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 832bcc2a..17b4de6f 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -358,14 +358,7 @@ fi
if ! strstr "$cmdline" nodmraid && [ -x /sbin/dmraid ]; then
modprobe dm-mirror >/dev/null 2>&1
- for x in $(/sbin/dmraid -ay -i -p -t 2>/dev/null | \
- egrep -iv "^no " | \
- (IFS=":";while read a rest;do echo $a;done)) ; do
- dmname=$(resolve_dm_name $x)
- [ -z "$dmname" ] && continue
- /sbin/dmraid -ay -i -p "$dmname" >/dev/null 2>&1
- /sbin/kpartx -a -p p "/dev/mapper/$dmname"
- done
+ /sbin/dmraid -ay -i --rm_partitions >/dev/null 2>&1
fi
if [ -x /sbin/lvm ]; then