- Updated `wwctl upgrade` to handle updates - Maintained `.Container` and `.ContainerName` in tstruct - Added `ContainerName()` methods to node and profile objects - Added `--container`, `-C` aliases to wwctl commands (`<node|profile> <add|set>`) - Added `wwctl container` alias - Added support for `container_exit.sh` if `image_exit.sh` is not found Signed-off-by: Jonathon Anderson <janderson@ciq.com>
48 lines
1.4 KiB
Plaintext
48 lines
1.4 KiB
Plaintext
#!ipxe
|
|
{{ if .ImageName }}
|
|
echo
|
|
echo ================================================================================
|
|
echo Warewulf v4 now booting via dracut: {{.Fqdn}} ({{.Hwaddr}})
|
|
echo
|
|
echo Image: {{.ImageName}}
|
|
{{if .KernelVersion }}
|
|
echo Kernel: {{.KernelVersion}}
|
|
{{else}}
|
|
echo Kernel: {{.ImageName}} (image default)
|
|
{{end}}
|
|
echo KernelArgs: {{.KernelArgs}}
|
|
echo
|
|
|
|
set baseuri http://{{.Ipaddr}}:{{.Port}}/provision/{{.Hwaddr}}
|
|
set uri ${baseuri}?assetkey=${asset}&uuid=${uuid}
|
|
echo Warewulf Controller: {{.Ipaddr}}
|
|
|
|
echo Downloading Kernel Image:
|
|
kernel --name kernel ${uri}&stage=kernel || goto reboot
|
|
|
|
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=${baseuri} init=/init
|
|
|
|
echo Booting initramfs
|
|
boot kernel initrd=initramfs ${dracut_net} ${dracut_wwinit} wwid={{.Hwaddr}} {{.KernelArgs}}
|
|
|
|
|
|
:reboot
|
|
echo
|
|
echo There was an error, rebooting in 15s...
|
|
echo
|
|
sleep 15
|
|
reboot
|
|
{{ else }}
|
|
echo ================================================================================
|
|
echo Warewulf v4:
|
|
echo No image defined for this node ({{.Fqdn}}).
|
|
echo Rebooting in 30s.
|
|
echo ================================================================================
|
|
sleep 30
|
|
reboot
|
|
{{ end }}
|