aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2021-08-09 09:28:46 +0200
committerJóhann B. Guðmundsson <johannbg@gmail.com>2021-08-09 17:07:50 +0000
commit5ee7e249b8cc74461122ccd7efe954b3402c23da (patch)
treecec5529e41bd1afaeeb70e53afb6f53103ed749e
parent74a417994840f7a6119e2dee57f9a3bb4d84998b (diff)
downloaddracut-5ee7e249b8cc74461122ccd7efe954b3402c23da.tar.gz
fix(network-manager): check for nm-initrd-generator in both /usr/{libexec,lib}
Sice commit 22d6863ef1b2 ("fix(network-manager): cope with distributions not using `libexec`") nm-initrd-generator can be installed in either /usr/libexec or /usr/lib. Change other modules to check for the binary in both locations.
-rwxr-xr-xmodules.d/40network/module-setup.sh2
-rwxr-xr-xmodules.d/80cms/cmsifup.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
index 60824da6..9fd5d806 100755
--- a/modules.d/40network/module-setup.sh
+++ b/modules.d/40network/module-setup.sh
@@ -19,7 +19,7 @@ depends() {
if [ -z "$network_handler" ]; then
if [[ -x $dracutsysrootdir$systemdsystemunitdir/wicked.service ]]; then
network_handler="network-wicked"
- elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]]; then
+ elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]] || [[ -x $dracutsysrootdir/usr/lib/nm-initrd-generator ]]; then
network_handler="network-manager"
elif [[ -x $dracutsysrootdir$systemdutildir/systemd-networkd ]]; then
network_handler="systemd-networkd"
diff --git a/modules.d/80cms/cmsifup.sh b/modules.d/80cms/cmsifup.sh
index a319227a..73d76fbf 100755
--- a/modules.d/80cms/cmsifup.sh
+++ b/modules.d/80cms/cmsifup.sh
@@ -34,7 +34,7 @@ fi
IFACES="$IFACES $DEVICE"
echo "$IFACES" >> /tmp/net.ifaces
-if [ -x /usr/libexec/nm-initrd-generator ]; then
+if [ -x /usr/libexec/nm-initrd-generator ] || [ -x /usr/lib/nm-initrd-generator ]; then
type nm_generate_connections > /dev/null 2>&1 || . /lib/nm-lib.sh
nm_generate_connections
else