summaryrefslogtreecommitdiffstats
path: root/server/ipxe/registration.ipxe
diff options
context:
space:
mode:
Diffstat (limited to 'server/ipxe/registration.ipxe')
-rw-r--r--server/ipxe/registration.ipxe34
1 files changed, 21 insertions, 13 deletions
diff --git a/server/ipxe/registration.ipxe b/server/ipxe/registration.ipxe
index 51d89f2..1011765 100644
--- a/server/ipxe/registration.ipxe
+++ b/server/ipxe/registration.ipxe
@@ -1,5 +1,4 @@
#!ipxe
-dhcp
# Wallpaper
set crosscert http://ca.ipxe.org/auto/
@@ -10,22 +9,31 @@ console --picture ${img} --x 800 --y 600 || shell
:start
menu Initializing client registration
-item --key i init Initialize
+item --key a automatic Automatic registration
+item --key m manual Manual registration
item --key l localboot Localboot
item --key r reboot Reboot
item --key p poweroff Power Off
item --key s sh [Shell]
-choose --default init --timeout 15000 target && goto ${target} || goto init
+choose --default automatic --timeout 15000 target && goto ${target} || goto automatic
:localboot
exit0 ||
exit1 ||
goto start
-:init
+:automatic
+params
+param name unnamed
+param mac ${net0/mac}
+param uuid ${uuid}
+param ip ${net0/ip}
+chain https://bas.stfu-kthx.net:8888/api/registrations/add##params
+
+:manual
params
param id 0
-chain https://bas.stfu-kthx.net:8888/api/registration/group##params ||
+chain https://bas.stfu-kthx.net:8888/api/registrations/group##params ||
goto start
:reboot
@@ -35,12 +43,12 @@ reboot
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
+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 \ No newline at end of file