summaryrefslogtreecommitdiffstats
path: root/modules-available/serversetup-bwlp-ipxe/inc/scriptbuilderbase.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/serversetup-bwlp-ipxe/inc/scriptbuilderbase.inc.php')
-rw-r--r--modules-available/serversetup-bwlp-ipxe/inc/scriptbuilderbase.inc.php33
1 files changed, 28 insertions, 5 deletions
diff --git a/modules-available/serversetup-bwlp-ipxe/inc/scriptbuilderbase.inc.php b/modules-available/serversetup-bwlp-ipxe/inc/scriptbuilderbase.inc.php
index c6adc953..b9867ed9 100644
--- a/modules-available/serversetup-bwlp-ipxe/inc/scriptbuilderbase.inc.php
+++ b/modules-available/serversetup-bwlp-ipxe/inc/scriptbuilderbase.inc.php
@@ -11,6 +11,8 @@ abstract class ScriptBuilderBase
protected $clientIp;
+ protected $uuid;
+
/**
* @var bool Running iPXE has slx-extensions
*/
@@ -26,6 +28,16 @@ abstract class ScriptBuilderBase
return $this->platform;
}
+ public function uuid()
+ {
+ return $this->uuid;
+ }
+
+ public function clientIp()
+ {
+ return $this->clientIp;
+ }
+
public function getLabel()
{
return 'b' . mt_rand(100, 999) . 'x' . (++$this->lblId);
@@ -42,11 +54,11 @@ abstract class ScriptBuilderBase
if ($this->platform !== false) {
$this->platform = strtoupper($this->platform);
}
- Header('X-Popo: ' . $this->platform);
if ($this->platform !== 'EFI' && $this->platform !== 'PCBIOS') {
$this->platform = '';
}
$this->hasExtension = $slxExtensions ?? (bool)Request::any('slx-extensions', false, 'int');
+ $this->uuid = Request::any('uuid', false, 'string');
}
/**
@@ -55,13 +67,24 @@ abstract class ScriptBuilderBase
*/
public abstract function output($string);
- public abstract function getMenu($menuId);
+ public abstract function bootstrapLive();
- public abstract function getMenuEntry($menuEntryId);
+ public abstract function getMenu(IPxeMenu $menu, bool $bootstrap);
- public abstract function getSpecial($special);
+ /**
+ * @param MenuEntry|null $menuEntry The according menu entry, or null if invalid.
+ * @param bool $honorPassword Whether we should generate a password dialog if protected, or skip
+ * @return string generated script/code/...
+ */
+ public abstract function getMenuEntry($menuEntry, $honorPassword = true);
- public abstract function fallback();
+ /**
+ * @param BootEntry|null|false $bootEntry
+ * @return string
+ */
+ public abstract function getBootEntry($bootEntry);
+
+ public abstract function getSpecial($special);
/**
* @param IPxeMenu|null $menu