|
|
46e28b |
From 3e912f878de8d310bd06199e03602c63d2b60dba Mon Sep 17 00:00:00 2001
|
|
|
46e28b |
From: Radek Vykydal <rvykydal@redhat.com>
|
|
|
46e28b |
Date: Tue, 20 Dec 2022 16:40:23 +0100
|
|
|
46e28b |
Subject: [PATCH] fix(network-manager): allow running nm-run.sh multiple times
|
|
|
46e28b |
|
|
|
46e28b |
This partially reverts
|
|
|
46e28b |
https://github.com/redhat-plumbers/dracut-rhel9/commit/77630365aed201a729c73a9ffda0733a75f3fee4
|
|
|
46e28b |
|
|
|
46e28b |
Anaconda needs to be able to run nm-run.sh to trigger online hooks again
|
|
|
46e28b |
after kickstart is fetched from storage and network is configured
|
|
|
46e28b |
accordingly.
|
|
|
46e28b |
|
|
|
46e28b |
rhel-only
|
|
|
46e28b |
Resolves: rhbz#2157082
|
|
|
46e28b |
---
|
|
|
46e28b |
modules.d/35network-manager/nm-run.sh | 9 +++++----
|
|
|
46e28b |
1 file changed, 5 insertions(+), 4 deletions(-)
|
|
|
46e28b |
|
|
|
46e28b |
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
|
|
|
46e28b |
index 7d8d61fa..6110733d 100755
|
|
|
46e28b |
--- a/modules.d/35network-manager/nm-run.sh
|
|
|
46e28b |
+++ b/modules.d/35network-manager/nm-run.sh
|
|
|
46e28b |
@@ -2,11 +2,12 @@
|
|
|
46e28b |
|
|
|
46e28b |
type source_hook > /dev/null 2>&1 || . /lib/dracut-lib.sh
|
|
|
46e28b |
|
|
|
46e28b |
-if [ -e /tmp/nm.done ]; then
|
|
|
46e28b |
- return
|
|
|
46e28b |
-fi
|
|
|
46e28b |
-
|
|
|
46e28b |
if [ -z "$DRACUT_SYSTEMD" ]; then
|
|
|
46e28b |
+
|
|
|
46e28b |
+ if [ -e /tmp/nm.done ]; then
|
|
|
46e28b |
+ return
|
|
|
46e28b |
+ fi
|
|
|
46e28b |
+
|
|
|
46e28b |
# Only start NM if networking is needed
|
|
|
46e28b |
if [ -e /run/NetworkManager/initrd/neednet ]; then
|
|
|
46e28b |
for i in /usr/lib/NetworkManager/system-connections/* \
|