e83cdd
From 68fefe6f9424d3f29e6da9133579c385e7b470b2 Mon Sep 17 00:00:00 2001
e83cdd
From: Lubomir Rintel <lkundrak@v3.sk>
e83cdd
Date: Mon, 27 May 2019 12:43:59 +0200
e83cdd
Subject: [PATCH] network-manager: generate configuration with netroot=
e83cdd
e83cdd
If the root is on network, let nm-initrd-generator create configuration
e83cdd
even if none was explicitly specified on the command line.
e83cdd
e83cdd
Also do the same if /tmp/net.ifaces exists, because the anaconda plugin
e83cdd
creates an empty file in that location in hopes that will make us
e83cdd
configure the network.
e83cdd
e83cdd
(cherry picked from commit 381ab6b7cd2d35bf7f9da63b10c20f5ef6e61a8b)
e83cdd
---
e83cdd
 modules.d/35network-manager/nm-config.sh | 4 ++++
e83cdd
 1 file changed, 4 insertions(+)
e83cdd
e83cdd
diff --git a/modules.d/35network-manager/nm-config.sh b/modules.d/35network-manager/nm-config.sh
e83cdd
index 1339ebe7..1efa737c 100755
e83cdd
--- a/modules.d/35network-manager/nm-config.sh
e83cdd
+++ b/modules.d/35network-manager/nm-config.sh
e83cdd
@@ -1,3 +1,7 @@
e83cdd
 #!/bin/sh
e83cdd
 
e83cdd
+if [ -n "$netroot" ] || [ -e /tmp/net.ifaces ]; then
e83cdd
+    echo rd.neednet >> /etc/cmdline.d/35-neednet.conf
e83cdd
+fi
e83cdd
+
e83cdd
 /usr/libexec/nm-initrd-generator -- $(getcmdline)
e83cdd