netboot.xyz/etc/netbootxyz/custom/custom.ipxe.j2
Antony Messerli 413f49b4d5
Add ability for self hosted custom menus (#23)
* Adds ability for self hosted custom menus

Templates can be added to /etc/netbootxyz/custom and are
generated and placed in the custom directory of the root
web directory by setting custom_generate_menus to true.

This provides an option on the main netboot.xyz menu to chain
into a custom environment so that seperate local menus can be
added and maintained seperately from the netboot.xyz source
code tree.

* Remove todo
2019-11-29 16:02:15 -06:00

37 lines
813 B
Django/Jinja

#!ipxe
###
### {{ site_name }} custom menu example
###
:custom
clear custom_choice
menu This is a Test Menu
item --gap This is the first sub menu
item option_one ${space} Loading a kernel and initrd
item option_two ${space} Loading an ISO
item --gap This is a second sub menu
item option_three ${space} Loads another custom sub menu
item option_four ${space} This is option four
choose custom_choice || goto custom_exit
echo ${cls}
goto ${custom_choice}
goto custom_exit
:option_one
kernel http://path.to/vmlinuz
initrd http://path.to/initrd
imgargs vmlinuz put_kernel_img_args_here
boot || goto custom_exit
:option_two
kernel {{ memdisk_location }} raw iso
initrd http://path.to/iso
boot || goto custom_exit
:option_three
echo Chains into another menu...
chain custom1.ipxe || goto custom
:custom_exit
exit