d1a34d
From 5f8012de4cb73b90d69075e8118d904302d41c20 Mon Sep 17 00:00:00 2001
d1a34d
From: Beniamino Galvani <bgalvani@redhat.com>
d1a34d
Date: Mon, 9 Aug 2021 09:28:46 +0200
d1a34d
Subject: [PATCH] fix(network-manager): check for nm-initrd-generator in both
d1a34d
 /usr/{libexec,lib}
d1a34d
d1a34d
Sice commit 22d6863ef1b2 ("fix(network-manager): cope with distributions not
d1a34d
using `libexec`") nm-initrd-generator can be installed in either /usr/libexec
d1a34d
or /usr/lib. Change other modules to check for the binary in both locations.
d1a34d
d1a34d
(cherry picked from commit 5ee7e249b8cc74461122ccd7efe954b3402c23da)
d1a34d
d1a34d
Resolves: #1975929
d1a34d
---
d1a34d
 modules.d/40network/module-setup.sh | 2 +-
d1a34d
 modules.d/80cms/cmsifup.sh          | 2 +-
d1a34d
 2 files changed, 2 insertions(+), 2 deletions(-)
d1a34d
d1a34d
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
d1a34d
index 60824da6..9fd5d806 100755
d1a34d
--- a/modules.d/40network/module-setup.sh
d1a34d
+++ b/modules.d/40network/module-setup.sh
d1a34d
@@ -19,7 +19,7 @@ depends() {
d1a34d
     if [ -z "$network_handler" ]; then
d1a34d
         if [[ -x $dracutsysrootdir$systemdsystemunitdir/wicked.service ]]; then
d1a34d
             network_handler="network-wicked"
d1a34d
-        elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]]; then
d1a34d
+        elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]] || [[ -x $dracutsysrootdir/usr/lib/nm-initrd-generator ]]; then
d1a34d
             network_handler="network-manager"
d1a34d
         elif [[ -x $dracutsysrootdir$systemdutildir/systemd-networkd ]]; then
d1a34d
             network_handler="systemd-networkd"
d1a34d
diff --git a/modules.d/80cms/cmsifup.sh b/modules.d/80cms/cmsifup.sh
d1a34d
index a319227a..73d76fbf 100755
d1a34d
--- a/modules.d/80cms/cmsifup.sh
d1a34d
+++ b/modules.d/80cms/cmsifup.sh
d1a34d
@@ -34,7 +34,7 @@ fi
d1a34d
 IFACES="$IFACES $DEVICE"
d1a34d
 echo "$IFACES" >> /tmp/net.ifaces
d1a34d
 
d1a34d
-if [ -x /usr/libexec/nm-initrd-generator ]; then
d1a34d
+if [ -x /usr/libexec/nm-initrd-generator ] || [ -x /usr/lib/nm-initrd-generator ]; then
d1a34d
     type nm_generate_connections > /dev/null 2>&1 || . /lib/nm-lib.sh
d1a34d
     nm_generate_connections
d1a34d
 else
d1a34d