summaryrefslogtreecommitdiff
path: root/modules.d/90multipath
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2012-04-25 11:23:49 +0200
committerHarald Hoyer <harald@redhat.com>2012-04-25 15:58:40 +0200
commit5dc1be1df8c235040a47ab1bd212102c5bb450cb (patch)
tree64f94650e0be9d97528afee629e58459fca6c3d3 /modules.d/90multipath
parentcb08b0132f6e6631b04576959549c0a0d8218afd (diff)
downloaddracut-5dc1be1df8c235040a47ab1bd212102c5bb450cb.tar.gz
dracut-5dc1be1df8c235040a47ab1bd212102c5bb450cb.tar.bz2
dracut-5dc1be1df8c235040a47ab1bd212102c5bb450cb.zip
multipath/module-setup.sh: fix host-only/mount checks
Diffstat (limited to 'modules.d/90multipath')
-rwxr-xr-xmodules.d/90multipath/module-setup.sh16
1 files changed, 7 insertions, 9 deletions
diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
index 2bc1b412..2af112a0 100755
--- a/modules.d/90multipath/module-setup.sh
+++ b/modules.d/90multipath/module-setup.sh
@@ -11,18 +11,16 @@ check() {
[[ $debug ]] && set -x
is_mpath() {
- [ -e /sys/dev/block/$1/dm/uuid ] || return 1
- [[ $(cat /sys/dev/block/$1/dm/uuid) =~ ^mpath- ]] && return 0
+ 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
return 1
}
- if [[ $hostonly ]]; then
- _rootdev=$(find_root_block_device)
- if [[ $_rootdev ]]; then
- check_block_and_slaves is_mpath "$_rootdev" && return 0
- fi
- return 1
- fi
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
+ for_each_host_dev_fs is_mpath || return 1
+ }
return 0
}