From b3a3b56b7f2a9a9848397fea1ee657cf07b9e2e5 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 26 Mar 2019 12:02:57 +0100 Subject: [serversetup-bwlp-ipxe] Fix: Autoboot not working for chained menus If chaining from one menu to another, the menu-with-single-entry autoboot rule would not work and yield a menu with a single item and no timeout. Fix the ipxe spaghetti code to do the right thing. --- modules-available/serversetup-bwlp-ipxe/api.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules-available/serversetup-bwlp-ipxe/api.inc.php b/modules-available/serversetup-bwlp-ipxe/api.inc.php index 67da6727..9b52f333 100644 --- a/modules-available/serversetup-bwlp-ipxe/api.inc.php +++ b/modules-available/serversetup-bwlp-ipxe/api.inc.php @@ -79,6 +79,7 @@ if ($menu !== false) { // If this is a menu with a single item, treat a timeout of 0 as "boot immediately" instead of "infinite" if ($menu->itemCount() === 1 && $menu->timeoutMs() === 0 && ($tmp = $menu->getDefaultScriptLabel()) !== false) { $directBoot = "goto $tmp ||"; + $initLabel = 'init'; } else { $directBoot = ''; } -- cgit v1.2.3-55-g7522