In its install function the module calls multipath -t, with the clear assumption that the result describes the version to be installed into the initrd:
|
local k v |
|
while read -r k v; do |
|
if [[ $k == "config_dir" ]]; then |
|
v="${v#\"}" |
|
config_dir="${v%\"}" |
|
break |
|
fi |
|
done < <(multipath -t 2> /dev/null) |
|
[[ -d $config_dir ]] || config_dir=/etc/multipath/conf.d |
This does not work with --sysroot: The multipath binary in the sysroot may be different from the one in PATH, and in case of a cross-compiled sysroot it may not be executable at all while building the initrd.
The result is used to determine the config directory, with a fallback to /etc/multipath/conf.d if unsuccessful, so it may not be critical (I'm not familiar with the module or multipath).
If possible the location should be determined without calling the binary, if this is not possible the binary in the sysroot (if any) needs to be called, with an override for cross-sysroot where that cannot work (see the busybox module for an example).
In its
installfunction the module callsmultipath -t, with the clear assumption that the result describes the version to be installed into the initrd:dracut/modules.d/70multipath/module-setup.sh
Lines 80 to 88 in 8453799
This does not work with
--sysroot: Themultipathbinary in the sysroot may be different from the one inPATH, and in case of a cross-compiled sysroot it may not be executable at all while building the initrd.The result is used to determine the config directory, with a fallback to
/etc/multipath/conf.dif unsuccessful, so it may not be critical (I'm not familiar with the module ormultipath).If possible the location should be determined without calling the binary, if this is not possible the binary in the sysroot (if any) needs to be called, with an override for cross-sysroot where that cannot work (see the
busyboxmodule for an example).