From becd0a5e323d800527cd5cd50d6486d5752db5ea Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Fri, 5 Jul 2024 11:52:09 -0600 Subject: [PATCH] Pass wwinit.KernelOverride explicitly Rather than create a new wwinit.kmods boolean, pass wwinit.KernelOverride explicitly to dracut and allow it to perform the same logic that previously had been in iPXE. Signed-off-by: Jonathon Anderson --- dracut/modules.d/90wwinit/parse-wwinit.sh | 6 ++++-- etc/ipxe/dracut.ipxe | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dracut/modules.d/90wwinit/parse-wwinit.sh b/dracut/modules.d/90wwinit/parse-wwinit.sh index 6ee37184..322364e6 100755 --- a/dracut/modules.d/90wwinit/parse-wwinit.sh +++ b/dracut/modules.d/90wwinit/parse-wwinit.sh @@ -10,8 +10,10 @@ then export wwinit_container="${wwinit_uri}container&compress=gz"; info "wwinit.container=${wwinit_container}" export wwinit_system="${wwinit_uri}system&compress=gz"; info "wwinit.system=${wwinit_system}" export wwinit_runtime="${wwinit_uri}runtime&compress=gz"; info "wwinit.runtime=${wwinit_runtime}" - wwinit_kmods_passed=$(getarg wwinit.kmods=) - [ -n "$wwinit_kmods_passed" ] && export wwinit_kmods="${wwinit_uri}kmods&compress=gz"; info "wwinit.kmods=${wwinit_kmods}" + if [ -n "$(getarg wwinit.KernelOverride)" ] + then + export wwinit_kmods="${wwinit_uri}kmods&compress=gz"; info "wwinit.kmods=${wwinit_kmods}" + fi wwinit_tmpfs_size=$(getarg wwinit.tmpfs.size=) if [ -n "$wwinit_tmpfs_size" ] diff --git a/etc/ipxe/dracut.ipxe b/etc/ipxe/dracut.ipxe index 0f91977f..9da62bb2 100644 --- a/etc/ipxe/dracut.ipxe +++ b/etc/ipxe/dracut.ipxe @@ -29,7 +29,7 @@ echo Downloading initramfs initrd --name initramfs ${uri}&stage=initramfs || goto reboot set dracut_net rd.neednet=1 {{range $devname, $netdev := .NetDevs}}{{if and $netdev.Hwaddr $netdev.Device}} ifname={{$netdev.Device}}:{{$netdev.Hwaddr}} {{end}}{{end}} -set dracut_wwinit root=wwinit wwinit_uri={{.Ipaddr}}:{{.Port}} {{if ne .KernelOverride ""}}wwinit.kmods=true{{end}} init=/init +set dracut_wwinit root=wwinit wwinit_uri={{.Ipaddr}}:{{.Port}} {{if ne .KernelOverride ""}}wwinit.KernelOverride={{ .KernelOverride }}{{end}} init=/init echo Booting initramfs #echo Network KernelArgs: ${dracut_net}