]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
revert(network-manager): avoid restarting NetworkManager
authorLubomir Rintel <lkundrak@v3.sk>
Tue, 20 Dec 2022 12:06:43 +0000 (13:06 +0100)
committerAntonio Álvarez Feijoo <antonio.feijoo@suse.com>
Tue, 14 Feb 2023 15:56:34 +0000 (16:56 +0100)
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

index 7d8d61fa74ad47d23527d2cb09189d111931217b..14b9cb1ade0211a5c310bb680cfc25474e125a4d 100755 (executable)
@@ -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