SHA256
1
0
forked from pool/warewulf4
warewulf4/empty-container.patch
Christian Goll 92d613936f - Provide an overlay package for the cluster-wide configuration
of an RKE2 cluster. This allows to share the connection token
  across all node and sthe first server endpoint across all agents.

OBS-URL: https://build.opensuse.org/package/show/network:cluster/warewulf4?expand=0&rev=97
2025-02-21 09:25:58 +00:00

72 lines
2.4 KiB
Diff

diff --git a/etc/grub/grub.cfg.ww b/etc/grub/grub.cfg.ww
index f7ecac23..859d2d51 100644
--- a/etc/grub/grub.cfg.ww
+++ b/etc/grub/grub.cfg.ww
@@ -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 }}
diff --git a/etc/ipxe/default.ipxe b/etc/ipxe/default.ipxe
index 7db56e27..dbe10ed7 100644
--- a/etc/ipxe/default.ipxe
+++ b/etc/ipxe/default.ipxe
@@ -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 }}
diff --git a/etc/ipxe/dracut.ipxe b/etc/ipxe/dracut.ipxe
index 4336b01e..7ae3b77e 100644
--- a/etc/ipxe/dracut.ipxe
+++ b/etc/ipxe/dracut.ipxe
@@ -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 }}
\ No newline at end of file