basic dynamic menu generation

This commit is contained in:
2019-11-18 01:06:28 -05:00
parent 48f5f347b1
commit 0dac14d7e1
6 changed files with 94 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
#!ipxe
console --picture {{ request.url_root }}ipxe/bg.png --left 32 --right 32 --top 32 --bottom 48
{% block menu %}
{% endblock %}

View File

@@ -0,0 +1,21 @@
{% extends 'formatting.ipxe.j2' %}
{% block menu%}
dhcp
echo MAIN MENU
cpuid --ext 29 && set bits 64 || set bits 32
cpuid --ext 29 && set arch x86_64 || set arch x86
:main
menu BootBox @ {{ request.url_root }}
{% for mt in ('install', 'utilities') %}
item --gap -- == {{ mt.upper() }} ==
{% for os in db.getMenu(mt) %}
item --key {{ os['shortcut'] }} {{ os['name'] }} ({{ os['shortcut'] }}) {{ os['desc'] }}
{%- endfor %}
{% endfor %}
shell
{% endblock %}