summaryrefslogtreecommitdiffstats
path: root/server/ipxe/embedded.ipxe
diff options
context:
space:
mode:
Diffstat (limited to 'server/ipxe/embedded.ipxe')
-rw-r--r--server/ipxe/embedded.ipxe27
1 files changed, 23 insertions, 4 deletions
diff --git a/server/ipxe/embedded.ipxe b/server/ipxe/embedded.ipxe
index cdf1324..810a1ce 100644
--- a/server/ipxe/embedded.ipxe
+++ b/server/ipxe/embedded.ipxe
@@ -4,10 +4,29 @@
# EMBEDDED SCRIPT #
###################
-ifopen
-iseq ${platform} pcbios || dhcp ||
+ifopen ||
+
+iseq ${gateway} ${} || goto loop
+iseq ${ip} ${} || goto loop
+echo Running DHCP since no IP config was found
+dhcp ||
:loop
-chain -ar https://bas.intra.uni-freiburg.de/api/configloader/${uuid} || sleep 5
+chain -ar https://bas.intra.uni-freiburg.de/api/configloader/${uuid} ||
+# Error check
+set error ${errno}
+iseq ${error} 0x216eb8f && goto timeerror ||
+iseq ${error} 0x216ea8f && goto hostnameerror ||
+sleep 5
dhcp ||
-goto loop \ No newline at end of file
+goto loop
+
+:timeerror
+echo Certificate Issue:
+echo Check if your systemtime matches the validity period of the certificate.
+prompt Press any key to reboot && reboot
+
+:hostnameerror
+echo Certificate Issue:
+echo Your hostname does not match the hostname in the certificate.
+prompt Press any key to reboot && reboot \ No newline at end of file