]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(network-manager): check for nm-initrd-generator in both /usr/{libexec,lib}
authorBeniamino Galvani <bgalvani@redhat.com>
Mon, 9 Aug 2021 07:28:46 +0000 (09:28 +0200)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Mon, 9 Aug 2021 17:07:50 +0000 (17:07 +0000)
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.

modules.d/40network/module-setup.sh
modules.d/80cms/cmsifup.sh

index 60824da6e1d843756c719b2df8db485a3360e5b8..9fd5d806d74742dac385b453df9d4c9925897f4c 100755 (executable)
@@ -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"
index a319227a6b369241fb26f81541671abd538a04dc..73d76fbf29c6133c8a0e4585cff1973bab9875a0 100755 (executable)
@@ -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