summaryrefslogtreecommitdiffstats
path: root/server/ipxe/embedded.ipxe
diff options
context:
space:
mode:
authorJannik Schönartz2021-03-23 20:41:52 +0100
committerJannik Schönartz2021-03-23 20:41:52 +0100
commitfe5d6339d8af14bf6837b7280df37266586d904c (patch)
treefaa835543e541103cf66dc89f0a632f0da0efa73 /server/ipxe/embedded.ipxe
parent[server/ipxe] Add some more gitignore (diff)
downloadbas-fe5d6339d8af14bf6837b7280df37266586d904c.tar.gz
bas-fe5d6339d8af14bf6837b7280df37266586d904c.tar.xz
bas-fe5d6339d8af14bf6837b7280df37266586d904c.zip
[server/ipxe_builder] Update embedded ipxe + config
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