|
|
@ -11,18 +11,16 @@ check() { |
|
|
|
[[ $debug ]] && set -x |
|
|
|
[[ $debug ]] && set -x |
|
|
|
|
|
|
|
|
|
|
|
is_mpath() { |
|
|
|
is_mpath() { |
|
|
|
[ -e /sys/dev/block/$1/dm/uuid ] || return 1 |
|
|
|
local _dev |
|
|
|
[[ $(cat /sys/dev/block/$1/dm/uuid) =~ ^mpath- ]] && return 0 |
|
|
|
_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 |
|
|
|
return 1 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if [[ $hostonly ]]; then |
|
|
|
[[ $hostonly ]] || [[ $mount_needs ]] && { |
|
|
|
_rootdev=$(find_root_block_device) |
|
|
|
for_each_host_dev_fs is_mpath || return 1 |
|
|
|
if [[ $_rootdev ]]; then |
|
|
|
} |
|
|
|
check_block_and_slaves is_mpath "$_rootdev" && return 0 |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
return 1 |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return 0 |
|
|
|
return 0 |
|
|
|
} |
|
|
|
} |
|
|
|