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