17094c
From 4f43dd89a1f9c21f66d6b460c0ad1b271ee40492 Mon Sep 17 00:00:00 2001
17094c
From: Lukas Nykryn <lnykryn@redhat.com>
17094c
Date: Mon, 25 May 2020 11:59:31 +0200
17094c
Subject: [PATCH] Revert "[RHEL] network: default to network-legacy even in
17094c
 presence of nm-initrd-generator"
17094c
17094c
This reverts commit 7843bc52777683f6a4ef953d8dde7171ff3b911c.
17094c
17094c
This will cause that NM will be used in initrd on systems where it is installed.
17094c
17094c
Resolves: #1839706
17094c
---
17094c
 modules.d/40network/module-setup.sh | 6 +++---
17094c
 1 file changed, 3 insertions(+), 3 deletions(-)
17094c
17094c
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
17094c
index bf252eb7..8e2a74a3 100755
17094c
--- a/modules.d/40network/module-setup.sh
17094c
+++ b/modules.d/40network/module-setup.sh
17094c
@@ -8,9 +8,9 @@ check() {
17094c
 # called by dracut
17094c
 depends() {
17094c
     echo -n "kernel-network-modules "
17094c
-    # RHEL 8.1: Default to network-legacy unless the user chose
17094c
-    # network-manager manually
17094c
-    if ! dracut_module_included "network-manager" ; then
17094c
+    if ! dracut_module_included "network-legacy" && [ -x "/usr/libexec/nm-initrd-generator" ] ; then
17094c
+        echo "network-manager"
17094c
+    else
17094c
         echo "network-legacy"
17094c
     fi
17094c
     return 0
17094c