]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
90multipath: check() - Regexp fix to match multipath partition.
authorChao Wang <chaowang@redhat.com>
Thu, 26 Jul 2012 03:24:26 +0000 (11:24 +0800)
committerHarald Hoyer <harald@redhat.com>
Thu, 26 Jul 2012 06:35:02 +0000 (08:35 +0200)
A multipath partition's uuid will be presented like:
 # cat /sys/dev/block/$_dev/dm/uuid
 part1-mpath-360060e801047103004f2c4b300000008

So in this case, change the match regexp from '^mpath-' to 'mpath-'.

Signed-off-by: Chao Wang <chaowang@redhat.com>
modules.d/90multipath/module-setup.sh

index b14f82930e9a65cbcd5156cd08009cd8c261b9cf..98748d340d9ebb35d6fe5bfa297a29022b4f2a7c 100755 (executable)
@@ -11,7 +11,7 @@ check() {
         local _dev
         _dev=$(get_maj_min $1)
         [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1
-        [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ ^mpath- ]] && return 0
+        [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ mpath- ]] && return 0
         return 1
     }