report error if no container was defined

Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
Christian Goll
2024-07-08 08:33:34 +02:00
committed by Jonathon Anderson
parent 44097b89b5
commit 640a046dd9
4 changed files with 31 additions and 2 deletions

View File

@@ -45,6 +45,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Show more information during `wwctl container <shell|exec>` about when and if the container image will be rebuilt. #1302
- Command-line completion for `wwctl overlay <edit|delete|chmod|chown>`. #1298
- Display an error during boot if no container is defined. #1295
### Fixed

View File

@@ -1,3 +1,4 @@
{{ if .ContainerName }}
echo "================================================================================"
echo "Warewulf v4 now http booting grub: {{.Fqdn}} ({{.Hwaddr}})"
echo "================================================================================"
@@ -89,3 +90,12 @@ menuentry "System shutdown" {
echo "System shutting down..."
halt
}
{{ else }}
echo "================================================================================"
echo " Warewulf v4:"
echo " No node image/container defined for this node ({{.Fqdn}})."
echo " Rebooting in 30s."
echo "================================================================================"
sleep 30
reboot
{{ end }}

View File

@@ -1,5 +1,5 @@
#!ipxe
{{ if .ContainerName }}
echo
echo ================================================================================
echo Warewulf v4 now booting: {{.Fqdn}} ({{.Hwaddr}})
@@ -106,3 +106,12 @@ echo There was an error, rebooting in 15s...
echo
sleep 15
reboot
{{ else }}
echo ================================================================================
echo Warewulf v4:
echo No node image/container defined for this node ({{.Fqdn}}).
echo Rebooting in 30s.
echo ================================================================================
sleep 30
reboot
{{ end }}

View File

@@ -1,5 +1,5 @@
#!ipxe
{{ if .ContainerName }}
echo
echo ================================================================================
echo Warewulf v4 now booting via dracut: {{.Fqdn}} ({{.Hwaddr}})
@@ -44,3 +44,12 @@ echo There was an error, rebooting in 15s...
echo
sleep 15
reboot
{{ else }}
echo ================================================================================
echo Warewulf v4:
echo No node image/container defined for this node ({{.Fqdn}}).
echo Rebooting in 30s.
echo ================================================================================
sleep 30
reboot
{{ end }}