Am 25.04.2012 15:46, schrieb Vivek Goyal:
> On Wed, Apr 25, 2012 at 11:26:15AM +0200, Harald Hoyer wrote:
>
> Hi Harald,
>
> [..]
>> is_mpath() {
>> - [ -e /sys/dev/block/$1/dm/uuid ] || return 1
>> - [[ $(cat /sys/dev/block/$1/dm/uuid) =~ ^mpath- ]] && return 0
>> + local _dev
>> + _dev=${1##/dev/}
>> + [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1
>> + [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ ^mpath- ]] && return 0
>
> Will this work? _dev is device name (sda) and /sys/dev/block/ has links
> based on device "maj:min". I applied this patch and ran dracut and I
> see that multipath module did not get included.
>
> Thanks
> Vivek
oh.. you are right:
diff --git a/modules.d/90multipath/module-setup.sh
b/modules.d/90multipath/module-setup.sh
index ae9ec59..2af112a 100755
--- a/modules.d/90multipath/module-setup.sh
+++ b/modules.d/90multipath/module-setup.sh
@@ -12,7 +12,7 @@ check() {
is_mpath() {
local _dev
- _dev=${1##/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
diff --git a/modules.d/95iscsi/module-setup.sh
b/modules.d/95iscsi/module-setup.sh
index 34e101c..bfd9d73 100755
--- a/modules.d/95iscsi/module-setup.sh
+++ b/modules.d/95iscsi/module-setup.sh
@@ -16,7 +16,7 @@ check() {
is_iscsi() (
local _dev
- _dev=${1##/dev/}
+ _dev=$(get_maj_min $1)
[[ -L /sys/dev/block/$_dev ]] || return
cd "$(readlink -f /sys/dev/block/$_dev)"
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html