Blob Blame History Raw
From 82a47345a8e7d54616481098b7b16de6e7fba83b Mon Sep 17 00:00:00 2001
From: Beniamino Galvani <bgalvani@redhat.com>
Date: Mon, 9 Aug 2021 09:01:32 +0200
Subject: [PATCH] fix(network-manager): write DHCP filename option to dhcpopts
 file

Anaconda parses the 'filename' variable [1] set in /tmp/net.$netif.dhcpopts to
determine the name of the kickstart file to use.

[1] https://github.com/rhinstaller/anaconda/blob/anaconda-35.21-1/dracut/fetch-kickstart-net.sh#L31-L34

(Cherry-picked from commit 1513505db452f9425ae1d25b9bb28c176d9c7ed9)

Resolves: #1991449
---
 modules.d/35network-manager/nm-run.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
index 61752384..94c19545 100755
--- a/modules.d/35network-manager/nm-run.sh
+++ b/modules.d/35network-manager/nm-run.sh
@@ -22,7 +22,7 @@ do
     state=/run/NetworkManager/devices/$(cat $_i/ifindex)
     grep -q connection-uuid= $state 2>/dev/null || continue
     ifname=${_i##*/}
-    sed -n 's/root-path/new_root_path/p;s/next-server/new_next_server/p' <$state >/tmp/dhclient.$ifname.dhcpopts
+    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
     source_hook initqueue/online $ifname
     /sbin/netroot $ifname
 done