summaryrefslogtreecommitdiffstats
path: root/server/ipxe/embedded.ipxe
blob: 810a1ce5ba9ad2bdb6f6051b721f65359ef0553b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!ipxe

###################
# EMBEDDED SCRIPT #
###################

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} ||
# Error check
set error ${errno}
iseq ${error} 0x216eb8f && goto timeerror ||
iseq ${error} 0x216ea8f && goto hostnameerror ||
sleep 5
dhcp ||
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