summaryrefslogtreecommitdiffstats
path: root/server/ipxe/registration.ipxe
blob: 1d50e5e84dcf5b03203c90d19c75ca3ce3081206 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!ipxe

# Wallpaper
set img https://bas.intra.uni-freiburg.de/files/ipxe_wallpaper.png || goto start
console --picture ${img} --x 800 --y 600 || console --x 1024 --y 768 ||

:start
menu Initializing client registration
item --gap [Registration]
item --key a automatic Automatic Registration
item --key s semiautomatic Semi-Automatic Registration
item --key m manual Manual Registration
item --gap
item --gap [Direct Boot]
item --key b bwlehrpool bwLehrpool
item --key l localboot Localboot
item --gap
item --gap [...]
item --key r reboot Reboot
item --key p poweroff Power Off
item --key s sh [Shell]
choose --default automatic --timeout 25000 target && goto ${target} || goto automatic

:bwlehrpool
chain --replace http://132.230.4.2/boot/ipxe

:localboot
exit0 ||
exit1 ||
goto start

:automatic
params
param ipxe true
param automatic true
param client { "type": "CLIENT", "uuid": "${uuid}", "purpose": "Pool PC", "networks": [{ "ip": "${net0/ip}", "mac": "${net0/mac}" }] }
chain https://bas.intra.uni-freiburg.de/api/registration/clients##params

:semiautomatic
params
param ipxe true
param client { "type": "CLIENT", "uuid": "${uuid}", "purpose": "Pool PC", "networks": [{ "ip": "${net0/ip}", "mac": "${net0/mac}" }] }
chain https://bas.intra.uni-freiburg.de/api/registration/clients##params

:manual
params
param id 0
chain https://bas.intra.uni-freiburg.de/api/registration/group##params ||
goto start

:reboot
reboot

:poweroff
poweroff

:sh
login
#echo Enter the password to access the shell
#read pw
#iseq ${pw} shell || goto start
#clear pw
iseq ${password} sh || goto start
clear username
clear password
shell