90multipath: check() - Regexp fix to match multipath partition.

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>
master
Chao Wang 2012-07-26 11:24:26 +08:00 committed by Harald Hoyer
parent 06c6ea654f
commit 63c65b984a
1 changed files with 1 additions and 1 deletions

View File

@ -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
}