2019-11-18 01:06:28 -05:00
|
|
|
{% extends 'formatting.ipxe.j2' %}
|
|
|
|
{% block menu%}
|
2019-11-18 05:38:04 -05:00
|
|
|
{# NET ############################################################################################################## #}
|
|
|
|
{#
|
|
|
|
# Refresh the DHCP lease just in case.
|
2019-11-18 01:06:28 -05:00
|
|
|
dhcp
|
2019-11-18 05:38:04 -05:00
|
|
|
#}
|
|
|
|
{# ARCH DETECTION ################################################################################################### #}
|
2019-11-18 01:06:28 -05:00
|
|
|
cpuid --ext 29 && set bits 64 || set bits 32
|
|
|
|
cpuid --ext 29 && set arch x86_64 || set arch x86
|
2019-11-18 05:38:04 -05:00
|
|
|
iseq ${platform} efi && set is_efi y || set is_efi n
|
|
|
|
{# BASE ############################################################################################################# #}
|
2019-11-18 01:06:28 -05:00
|
|
|
:main
|
|
|
|
menu BootBox @ {{ request.url_root }}
|
|
|
|
{% for mt in ('install', 'utilities') %}
|
2019-11-18 05:38:04 -05:00
|
|
|
item --gap -- = {{ mt.upper() }} =
|
2019-11-18 01:06:28 -05:00
|
|
|
{% for os in db.getMenu(mt) %}
|
|
|
|
item --key {{ os['shortcut'] }} {{ os['name'] }} ({{ os['shortcut'] }}) {{ os['desc'] }}
|
|
|
|
{%- endfor %}
|
|
|
|
{% endfor %}
|
2019-11-18 05:40:13 -05:00
|
|
|
choose --timeout 60000 --default rescue base || goto cancel
|
2019-11-18 05:38:04 -05:00
|
|
|
set menu-timeout 0
|
|
|
|
goto ${base}
|
|
|
|
{# CANCEL ########################################################################################################### #}
|
|
|
|
:cancel
|
2019-11-18 05:58:57 -05:00
|
|
|
echo iPXE canceled; continuing boot...
|
|
|
|
sleep 2
|
2019-11-18 05:38:04 -05:00
|
|
|
goto exit
|
|
|
|
{# REBOOT ########################################################################################################### #}
|
|
|
|
:reboot
|
2019-11-18 05:58:57 -05:00
|
|
|
echo Rebooting...
|
2019-11-18 05:38:04 -05:00
|
|
|
reboot
|
|
|
|
{# EXIT ############################################################################################################# #}
|
|
|
|
:exit
|
2019-11-18 05:58:57 -05:00
|
|
|
echo Exiting...
|
2019-11-18 05:38:04 -05:00
|
|
|
exit 0
|
|
|
|
{# CONFIGURE ######################################################################################################## #}
|
|
|
|
:config
|
|
|
|
config
|
|
|
|
goto main
|
|
|
|
{# SHELL ############################################################################################################ #}
|
|
|
|
:ipxe_shell
|
|
|
|
echo To return to the menu, use the "exit" command.
|
2019-11-18 01:06:28 -05:00
|
|
|
shell
|
2019-11-18 05:38:04 -05:00
|
|
|
goto :main
|
|
|
|
{# INSTALL ########################################################################################################## #}
|
|
|
|
{%- for os in db.getMenu('install') %}
|
|
|
|
:{{ os['name'] }}
|
|
|
|
menu == {{ os['desc'] }} ==
|
|
|
|
{%- for sub_os in db.getMenu(os['name']) %}
|
|
|
|
item --key {{ sub_os['shortcut'] }} {{ sub_os['name'] }} ({{ sub_os['shortcut'] }}) {{ sub_os['desc'] }} (version: {{ sub_os['version'] }})
|
|
|
|
{%- endfor %}
|
|
|
|
item --key < main (<) Back to Main Menu
|
2019-11-18 05:40:13 -05:00
|
|
|
choose --timeout 60000 --default main install_choice || goto cancel
|
2019-11-18 05:38:04 -05:00
|
|
|
set menu-timeout 0
|
|
|
|
goto ${install_choice}
|
|
|
|
{% endfor %}
|
|
|
|
{# UTILITIES ######################################################################################################## #}
|
|
|
|
{%- for u in db.getMenu('utilities') %}
|
|
|
|
:{{ u['name'] }}
|
|
|
|
{%- if u['command'] %}
|
|
|
|
{%- if u['command'].startswith('chain ') %}
|
|
|
|
{{ u['command'] }}
|
|
|
|
{%- else %}
|
|
|
|
goto {{ u['name'] }}
|
|
|
|
{%- endif %}
|
|
|
|
{%- else %}
|
|
|
|
menu === {{ u['desc'] }} ===
|
2019-11-18 06:04:57 -05:00
|
|
|
{%- if u['name'] == 'uefi_shell' %}
|
2019-11-18 05:38:04 -05:00
|
|
|
iseq ${is_efi} n && item --gap -- WARNING: Not detected as UEFI. These may not work correctly.
|
|
|
|
{%- endif %}
|
2019-11-18 06:07:19 -05:00
|
|
|
{%- for su in db.getMenu(u['name']) %}
|
2019-11-18 05:38:04 -05:00
|
|
|
item --key {{ su['shortcut'] }} {{ su['name'] }} ({{ su['shortcut'] }}) {{ su['desc'] }} (version: {{ su['version'] }})
|
|
|
|
{%- endfor %}
|
|
|
|
item --key < main (<) Back to Main Menu
|
2019-11-18 05:40:13 -05:00
|
|
|
choose --timeout 60000 --default main {{ u['name'] }}_choice || goto cancel
|
2019-11-18 05:38:04 -05:00
|
|
|
set menu-timeout 0
|
|
|
|
goto {{'${'}}{{ u['name'] }}_choice{{ '}' }}
|
|
|
|
{%- endif %}
|
|
|
|
{% endfor %}
|
|
|
|
# END
|
2019-11-18 01:06:28 -05:00
|
|
|
{% endblock %}
|