Skip to content

Commit

Permalink
fix(network-manager): check for nm-initrd-generator in both /usr/{lib…
Browse files Browse the repository at this point in the history
…exec,lib}

Sice commit 22d6863 ("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.
  • Loading branch information
bengal authored and johannbg committed Aug 9, 2021
1 parent 74a4179 commit 5ee7e24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules.d/40network/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion modules.d/80cms/cmsifup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5ee7e24

Please sign in to comment.