-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmenu.ejs
190 lines (147 loc) · 4.38 KB
/
menu.ejs
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
#!ipxe
set menu_version 2.0.0
set server_ip http://<%- auth %><%- boot_ip %>
set nfs_ip <%- boot_ip %>
set port <%= port %>
set update <%= update %>
set update_version <%= update_version %>
set version <%= version %>
set lockscreen <%= lockscreen %>
set go_to <%= go_to %>
set space:hex 20:20
set space ${space:string}
set pass 111
set esc:hex 1b # ANSI escape character - "^["
set cls ${esc:string}[2J # ANSI clear screen sequence - "^[[2J"
echo ${cls}
console --x 1024 --y 768
iseq ${lockscreen} 0 && set lockscreen_change_text [ ] Enable lockscreen || set lockscreen_change_text [*] Disable lockscreen
isset ${go_to} && goto ${go_to} ||
iseq ${lockscreen} 0 && goto start || goto lockscreen
:lockscreen
echo
echo ..........................................
echo ..........................................
echo ..........................................
echo ..........................................
echo ..........................................
echo ........TFTP-NP 2022 ${version} by Naben!......
echo ..........................................
echo ..........................................
echo ..........................................
echo ..........................................
echo ..........................................
echo
:first
echo
echo
prompt --key 0x13 ......Press secret key to continue........ && goto start || goto tryagain
echo
echo
:tryagain
echo ......Press secret key to continue........ && goto first
:start
colour --rgb 0xffffff 6
#cpair --foreground 7 --background 9 0
cpair --foreground 6 --background 9 1
cpair --foreground 7 --background 1 2
cpair --foreground 7 --background 9 3
cpair --foreground 7 --background 9 4
cpair --foreground 7 --background 9 5
cpair --foreground 7 --background 9 6
cpair --foreground 7 --background 9 7
#console -l 32 -r 32 -t 32 -b 32 -k --x 1024 --y 768 -d 24 -p ${server_ip}:${port}/${platform}.png
#imgfree ${platform}.png
set cls:hex 1b:5b:4a
set cls ${cls:string}
menu TFTP-NP 2022 ${version} ${boot_mode} ${update} ${update_version}
item --gap ${space} ${space} ${space} ${space} ${space} ${space} ${space} ${space} ${space} ${space} ${space} MAC:${net0/mac:hexhyp} ${space} IP:${ip}
item --gap
item --gap IPXES MENU
item ipxes ${space} * IPXES PACKS ...
item npstore ${space} * NP-STORE ...
<%- outputText %>
item --gap NETINSTALL MENU
item nabeninstall ${space} * Naben Install ...
#item fog ${space} * Fog Project
#item iventoy ${space} * iVentoy
item --gap iPXE shell
item reload ${space} * Reload menu
iseq ${platform} efi && item efi ${space} * Boot from hard (EFI mode) || item pcbios ${space} * Boot from hard (BIOS mode)
item settings ${space} * TFTP-NP Settings
item shell ${space} * Drop to iPXE shell
item config ${space} * Go to iPXE config
item reboot ${space} * Reboot
item poweroff ${space} * Poweroff
item exit ${space} * Exit
choose --default ${default_item} target && set default_item ${target} && goto ${target}
:npstore
chain --replace ${server_ip}:${port}/store
:ipxes
chain --replace ${server_ip}:${port}/ipxes
:settings
menu TFTP-NP 2022 ${version} ${boot_mode} ${update} ${update_version}
item --gap SETTINGS MENU
item lockscreen_change ${space} ${lockscreen_change_text}
item --gap
item goback <- Go back
choose target && goto ${target}
:lockscreen_change
params
param locksreen_change_state
initrd ${server_ip}:${port}/command##params
chain --replace ${server_ip}:${port}/menu/settings
<%- outputChain %>
:nabeninstall
echo Naben Install
chain https://pastebin.com/raw/iVDe7LUW || goto failed
:failed
echo
echo Booting failed, dropping to start menu due 5 sec
echo
sleep 1
echo 5
sleep 1
echo 4
sleep 1
echo 3
sleep 1
echo 2
sleep 1
echo 1
sleep 1
goto start
:shell
echo Type 'exit' to get the back to the menu
shell
set menu-timeout 0
set submenu-timeout 0
goto start
:reboot
reboot --warm ||
goto start
:reload
chain --replace ${server_ip}:${port}/menu ||
goto start
:poweroff
poweroff ||
goto start
:config
config ||
goto start
:goback
goto start
:exit
echo Continuing BIOS boot order...
sleep 1
exit 0
:efi
set client_mac ${net0/mac}
set client_ip ${net0/ip}
set client_uuid ${smbios/uuid}
set manufacturer ${smbios/manufacturer}
set product ${smbios/product}
imgfetch ${server_ip}:${port}/boot/efi/startos/refind.conf
chain -ar ${server_ip}:${port}/boot/efi/startos/refind_x64.efi
:pcbios
sanboot --no-describe --drive 0x80