3888c9
From 82a47345a8e7d54616481098b7b16de6e7fba83b Mon Sep 17 00:00:00 2001
3888c9
From: Beniamino Galvani <bgalvani@redhat.com>
3888c9
Date: Mon, 9 Aug 2021 09:01:32 +0200
3888c9
Subject: [PATCH] fix(network-manager): write DHCP filename option to dhcpopts
3888c9
 file
3888c9
3888c9
Anaconda parses the 'filename' variable [1] set in /tmp/net.$netif.dhcpopts to
3888c9
determine the name of the kickstart file to use.
3888c9
3888c9
[1] https://github.com/rhinstaller/anaconda/blob/anaconda-35.21-1/dracut/fetch-kickstart-net.sh#L31-L34
3888c9
3888c9
(Cherry-picked from commit 1513505db452f9425ae1d25b9bb28c176d9c7ed9)
3888c9
3888c9
Resolves: #1991449
3888c9
---
3888c9
 modules.d/35network-manager/nm-run.sh | 2 +-
3888c9
 1 file changed, 1 insertion(+), 1 deletion(-)
3888c9
3888c9
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
3888c9
index 61752384..94c19545 100755
3888c9
--- a/modules.d/35network-manager/nm-run.sh
3888c9
+++ b/modules.d/35network-manager/nm-run.sh
3888c9
@@ -22,7 +22,7 @@ do
3888c9
     state=/run/NetworkManager/devices/$(cat $_i/ifindex)
3888c9
     grep -q connection-uuid= $state 2>/dev/null || continue
3888c9
     ifname=${_i##*/}
3888c9
-    sed -n 's/root-path/new_root_path/p;s/next-server/new_next_server/p' <$state >/tmp/dhclient.$ifname.dhcpopts
3888c9
+    sed -n 's/root-path/new_root_path/p;s/next-server/new_next_server/p;s/dhcp-bootfile/filename/p' <$state >/tmp/dhclient.$ifname.dhcpopts
3888c9
     source_hook initqueue/online $ifname
3888c9
     /sbin/netroot $ifname
3888c9
 done