From 7a74f7ccec2eab739c6535b23c00e430d38e5a9b Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Mar 16 2023 08:02:54 +0000 Subject: revert(network-manager): avoid restarting NetworkManager https://github.com/dracutdevs/dracut/pull/2134 --- diff --git a/2134-revert-avoid-restarting-NetworkManager.patch b/2134-revert-avoid-restarting-NetworkManager.patch new file mode 100644 index 0000000..ab03c22 --- /dev/null +++ b/2134-revert-avoid-restarting-NetworkManager.patch @@ -0,0 +1,38 @@ +From 5dc6aede4b99f1c76219370660b5b62e935a3cb8 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Tue, 20 Dec 2022 13:06:43 +0100 +Subject: [PATCH] revert(network-manager): avoid restarting NetworkManager + +This reverts commit 77630365aed201a729c73a9ffda0733a75f3fee4. + +Its commit message states: + + On EL8.3 the NetworkManager keep restarting even if it exits successfully + while waiting for Clevis to unlock. This patch ensures NetworkManager runs + only once in initrd. + +Yes; NetworkManager is run multiple times, so that it's able to +configure interfaces that haven't been seen previously (because bus was +slow to scan or device took time to initialize). + +It's not clear what problem was the original commit trying to fix. +I suspect there was no problem, just a misunderstanding. +--- + modules.d/35network-manager/nm-run.sh | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh +index 7d8d61fa7..14b9cb1ad 100755 +--- a/modules.d/35network-manager/nm-run.sh ++++ b/modules.d/35network-manager/nm-run.sh +@@ -2,10 +2,6 @@ + + type source_hook > /dev/null 2>&1 || . /lib/dracut-lib.sh + +-if [ -e /tmp/nm.done ]; then +- return +-fi +- + if [ -z "$DRACUT_SYSTEMD" ]; then + # Only start NM if networking is needed + if [ -e /run/NetworkManager/initrd/neednet ]; then diff --git a/dracut.spec b/dracut.spec index 32954d8..eb6429c 100644 --- a/dracut.spec +++ b/dracut.spec @@ -49,6 +49,10 @@ Patch4: 2233-dmsquash-live-restore-compatibility.patch # https://bugzilla.redhat.com/show_bug.cgi?id=2173100 Patch5: 2237-kmoddir-fix-trailing-forwardslash-handling.patch +# revert(network-manager): avoid restarting NetworkManager +# https://github.com/dracutdevs/dracut/pull/2134 +Patch6: 2134-revert-avoid-restarting-NetworkManager.patch + BuildRequires: bash BuildRequires: git-core BuildRequires: pkgconfig(libkmod) >= 23 @@ -458,6 +462,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ * Thu Mar 09 2023 Pavel Valena - 059-4 - fix(dmsquash-live): restore compatibility with earlier releases - Re-add overlayfs module (drop patch 1934) +- revert(network-manager): avoid restarting NetworkManager * Fri Feb 24 2023 Pavel Valena - 059-3 - fix(dracut.sh): handle --kmoddir with trailing /