summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-03-11 15:02:13 +0100
committerSimon Rettberg2019-03-11 15:02:13 +0100
commit23ef39f786276e7e88fd4b035ef84c4f478c99e2 (patch)
treea791ce7b61c57a7ea5946d7a4faf6558d3919394
parent[serversetup-bwlp-ipxe/locations] Minor fixes (diff)
downloadslx-admin-23ef39f786276e7e88fd4b035ef84c4f478c99e2.tar.gz
slx-admin-23ef39f786276e7e88fd4b035ef84c4f478c99e2.tar.xz
slx-admin-23ef39f786276e7e88fd4b035ef84c4f478c99e2.zip
[serversetup-bwlp-ipxe] Skip empty inird entries
-rw-r--r--modules-available/serversetup-bwlp-ipxe/inc/bootentry.inc.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules-available/serversetup-bwlp-ipxe/inc/bootentry.inc.php b/modules-available/serversetup-bwlp-ipxe/inc/bootentry.inc.php
index a66736b6..0248e0ea 100644
--- a/modules-available/serversetup-bwlp-ipxe/inc/bootentry.inc.php
+++ b/modules-available/serversetup-bwlp-ipxe/inc/bootentry.inc.php
@@ -146,6 +146,7 @@ class StandardBootEntry extends BootEntry
if (!is_array($initrd)) {
$initrd = [$initrd];
}
+ $initrd = array_filter($initrd, function($x) { return strlen(trim($x)) !== 0; });
}
unset($initrd);
if ($this->arch === null) {
@@ -182,10 +183,13 @@ class StandardBootEntry extends BootEntry
if ($this->resetConsole[$mode]) {
$script .= "console ||\n";
}
+ // TODO: Checkbox
+ $script .= "imgfree ||\n";
$initrds = [];
if (!empty($this->initRd[$mode])) {
- $script .= "imgfree ||\n";
foreach (array_values($this->initRd[$mode]) as $i => $initrd) {
+ if (empty($initrd))
+ continue;
$script .= "initrd --name initrd$i $initrd || goto $failLabel\n";
$initrds[] = "initrd$i";
}