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.ipxe52
1 files changed, 52 insertions, 0 deletions
diff --git a/server/ipxe/registration.ipxe b/server/ipxe/registration.ipxe
new file mode 100644
index 0000000..88dc58f
--- /dev/null
+++ b/server/ipxe/registration.ipxe
@@ -0,0 +1,52 @@
+#!ipxe
+dhcp
+
+# Wallpaper
+set crosscert http://ca.ipxe.org/auto/
+#set img https://ife-server.com/b4db0y/ipxeWallpaper4.png || shell
+#set img tftp://bas.stfu-kthx.net/ipxeWallpaper4.png || shell
+set img tftp://bas.stfu-kthx.net/ipxeWallpaper3_scale.png || shell
+console --picture ${img} --x 800 --y 600 || shell
+
+:start
+menu Initializing client registration
+item --key i init Initialize
+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
+
+:localboot
+exit0 ||
+exit1 ||
+goto start
+
+:init
+echo Enter PC name
+read pcname
+params
+param mac ${net0/mac}
+param uuid ${uuid}
+param ip ${net0/ip}
+param name ${pcname}
+chain https://bas.stfu-kthx.net:8888/api/registration/client##params ||
+shell
+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 \ No newline at end of file