summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2008-05-15 12:12:23 -0400
committerBill Nottingham <notting@redhat.com>2008-05-15 12:12:23 -0400
commitee3a511e55113e998a023789420fa940edc7db71 (patch)
treee69a07e44f862fe46bfd3e4397b03fb09b65845c
parente9d7693047eb9858352ea58ae1891bcc49f6aa6e (diff)
parent8222b504ba5ca258b82f6949b80597b424e1f908 (diff)
downloadinitscripts-ee3a511e55113e998a023789420fa940edc7db71.tar.gz
initscripts-ee3a511e55113e998a023789420fa940edc7db71.tar.xz
initscripts-ee3a511e55113e998a023789420fa940edc7db71.zip
Merge branch 'master' of ssh://git.fedorahosted.org/git/initscripts
-rwxr-xr-xrc.d/init.d/functions7
1 files changed, 7 insertions, 0 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 57340fb6..d54861da 100755
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -564,6 +564,13 @@ resolve_dm_name() {
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"