dasharo.ipxe: fail message within script

Make iPXE itself print out an error if either of the network boot
options fail, instead of quietly returning to the menu or passing the
error for EDK2 to handle.

Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
This commit is contained in:
Filip Lewiński
2026-06-08 12:47:28 +02:00
parent b3c1872735
commit d5c8981b53
+27 -7
View File
@@ -15,23 +15,43 @@ choose --default boot --timeout 3000 target && goto ${target}
# main menu options # main menu options
:boot :boot
autoboot autoboot || goto autoboot_failed
goto MENU goto MENU
:dasharo :dasharo
dhcp || dhcp || goto dhcp_failed
chain https://boot.dasharo.com/dts/dts.ipxe || chain https://boot.dasharo.com/dts/dts.ipxe || goto dts_failed
exit 1 goto MENU
:netbootxyz :netbootxyz
dhcp || dhcp || goto dhcp_failed
chain https://boot.netboot.xyz/menu.ipxe || chain https://boot.netboot.xyz/menu.ipxe || goto netbootxyz_failed
exit 1 goto MENU
:shell :shell
echo You are now in iPXE shell. Type "exit" to go back to the main menu. echo You are now in iPXE shell. Type "exit" to go back to the main menu.
shell || shell ||
goto MENU goto MENU
:autoboot_failed
echo Autoboot failed.
prompt Press any key to return to menu...
goto MENU
:dhcp_failed
echo DHCP command failed.
prompt Press any key to return to menu...
goto MENU
:dts_failed
echo Loading DTS failed.
prompt Press any key to return to menu...
goto MENU
:netbootxyz_failed
echo Loading netboot.xyz failed.
prompt Press any key to return to menu...
goto MENU
autoboot autoboot