With dracutsysrootdir set and foreign binaries in sysroot,
running NetworkManager --version is not possible and it may be
different than the one installed on the host.
NM_VERSION can be used to override it.
Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
_SYSTEMCTL_::
overrides the systemctl binary. Used for **--sysroot**.
+_NM_VERSION_::
+ overrides the NetworkManager version. Used for **--sysroot**.
+
_DRACUT_INSTALL_PATH_::
overrides **PATH** environment for **dracut-install** to look for
binaries relative to **--sysroot**. In a cross-compiled environment
install() {
local _nm_version
- _nm_version=$(NetworkManager --version)
+ _nm_version=${NM_VERSION:-$(NetworkManager --version)}
# We don't need `ip` but having it is *really* useful for people debugging
# in an emergency shell.