]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
network-manager: generate configuration with netroot=
authorLubomir Rintel <lkundrak@v3.sk>
Mon, 27 May 2019 10:43:59 +0000 (12:43 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 19 Jul 2019 14:21:13 +0000 (16:21 +0200)
If the root is on network, let nm-initrd-generator create configuration
even if none was explicitly specified on the command line.

Also do the same if /tmp/net.ifaces exists, because the anaconda plugin
creates an empty file in that location in hopes that will make us
configure the network.

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

index 1339ebe76e3356f35678c84331d26f3eb830ed06..1efa737c5f6ae251d22507e98eafe4a3d48424c5 100755 (executable)
@@ -1,3 +1,7 @@
 #!/bin/sh
 
+if [ -n "$netroot" ] || [ -e /tmp/net.ifaces ]; then
+    echo rd.neednet >> /etc/cmdline.d/35-neednet.conf
+fi
+
 /usr/libexec/nm-initrd-generator -- $(getcmdline)