]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(35network-manager): avoid restarting NetworkManager
authorYang Liu <50459973+ly4096x@users.noreply.github.com>
Mon, 11 Jan 2021 08:50:45 +0000 (03:50 -0500)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 15 Jan 2021 10:18:24 +0000 (11:18 +0100)
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.

modules.d/35network-manager/nm-run.sh

index 61752384e77e57898791f6c95e268ac0777098b8..889dc64d792a6471ef706987e006458d3c1c49d7 100755 (executable)
@@ -1,5 +1,9 @@
 #!/bin/sh
 
+if [ -e /tmp/nm.done ]; then
+    return
+fi
+
 for i in /usr/lib/NetworkManager/system-connections/* \
          /run/NetworkManager/system-connections/* \
          /etc/NetworkManager/system-connections/* \