2023-01-19 04:02:23 +01:00
|
|
|
From 11a34f6b55f91610effd79ff1bf6a4bb2db760d3 Mon Sep 17 00:00:00 2001
|
2023-01-18 19:46:21 +01:00
|
|
|
From: Laszlo Gombos <laszlo.gombos@gmail.com>
|
2023-01-19 04:02:23 +01:00
|
|
|
Date: Wed, 18 Jan 2023 19:59:24 +0000
|
2023-01-18 19:46:21 +01:00
|
|
|
Subject: [PATCH] meta module should check if module exists
|
|
|
|
|
|
|
|
Bug: https://github.com/dracutdevs/dracut/issues/1756
|
|
|
|
---
|
2023-01-19 04:02:23 +01:00
|
|
|
modules.d/40network/module-setup.sh | 8 ++++----
|
|
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
2023-01-18 19:46:21 +01:00
|
|
|
|
|
|
|
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
|
2023-01-19 04:02:23 +01:00
|
|
|
index 1ab13ef..078cb4b 100755
|
2023-01-18 19:46:21 +01:00
|
|
|
--- a/modules.d/40network/module-setup.sh
|
|
|
|
+++ b/modules.d/40network/module-setup.sh
|
2023-01-19 04:02:23 +01:00
|
|
|
@@ -17,15 +17,15 @@ depends() {
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ -z "$network_handler" ]; then
|
|
|
|
- if [[ -e $dracutsysrootdir$systemdsystemunitdir/wicked.service ]]; then
|
|
|
|
+ if [[ -d "$dracutbasedir"/modules.d/35network-wicked ]] && [[ -e $dracutsysrootdir$systemdsystemunitdir/wicked.service ]]; then
|
|
|
|
network_handler="network-wicked"
|
|
|
|
- elif [[ -e $dracutsysrootdir$systemdsystemunitdir/connman.service ]]; then
|
|
|
|
+ elif [[ -d "$dracutbasedir"/modules.d/35connman ]] && [[ -e $dracutsysrootdir$systemdsystemunitdir/connman.service ]]; then
|
|
|
|
network_handler="connman"
|
|
|
|
- elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]] || [[ -x $dracutsysrootdir/usr/lib/nm-initrd-generator ]]; then
|
|
|
|
+ elif [[ -d "$dracutbasedir"/modules.d/35network-manager ]] && ( [[ -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
|
|
|
|
+ elif [[ -d "$dracutbasedir"/modules.d/01systemd-networkd ]] && [[ -x $dracutsysrootdir$systemdutildir/systemd-networkd ]]; then
|
|
|
|
network_handler="systemd-networkd"
|
|
|
|
- else
|
|
|
|
+ elif [[ -d "$dracutbasedir"/modules.d/35network-legacy ]]; then
|
|
|
|
network_handler="network-legacy"
|
2023-01-18 19:46:21 +01:00
|
|
|
fi
|
2023-01-19 04:02:23 +01:00
|
|
|
fi
|
|
|
|
--
|
2023-01-18 19:46:21 +01:00
|
|
|
2.34.1
|