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 <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-07-05 11:52:09 -06:00
parent c2cc0157ba
commit becd0a5e32
2 changed files with 5 additions and 3 deletions

View File

@@ -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" ]

View File

@@ -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}