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