Browse Source

fix(network-manager): allow override network manager version

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>
master
Zoltán Böszörményi 4 years ago committed by Jóhann B. Guðmundsson
parent
commit
767fbf81b6
  1. 3
      dracut.8.asc
  2. 2
      modules.d/35network-manager/module-setup.sh

3
dracut.8.asc

@ -599,6 +599,9 @@ _SYSTEMD_VERSION_:: @@ -599,6 +599,9 @@ _SYSTEMD_VERSION_::
_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

2
modules.d/35network-manager/module-setup.sh

@ -24,7 +24,7 @@ installkernel() { @@ -24,7 +24,7 @@ installkernel() {
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.

Loading…
Cancel
Save