From: Beniamino Galvani Date: Mon, 9 Aug 2021 07:28:46 +0000 (+0200) Subject: fix(network-manager): check for nm-initrd-generator in both /usr/{libexec,lib} X-Git-Tag: 056~121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ee7e249b8cc74461122ccd7efe954b3402c23da;p=thirdparty%2Fdracut.git 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. --- diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh index 60824da6e..9fd5d806d 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 a319227a6..73d76fbf2 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