diff options
author | Simon Rettberg | 2018-09-19 11:27:22 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-09-19 11:27:22 +0200 |
commit | 6da78493a0bb010a0fff50ac3cc23e018b15e979 (patch) | |
tree | 6baaa31e9d985e503e09cd669f11bce65355cd3d /modules-available/serversetup-bwlp/page.inc.php | |
parent | [serversetup-bwlp] Pass initrd= on KCL for EFI mode (diff) | |
download | slx-admin-6da78493a0bb010a0fff50ac3cc23e018b15e979.tar.gz slx-admin-6da78493a0bb010a0fff50ac3cc23e018b15e979.tar.xz slx-admin-6da78493a0bb010a0fff50ac3cc23e018b15e979.zip |
[serversetup-bwlp] Differentiate between EFI/BIOS
Different executable/initrd etc. can be given for a simple boot entry of
type "exec", or it can be specified that only one of them is supported.
For bootentry type "script" there can still be only one entry, since you
can just check the ${platform} variable within the script.
Diffstat (limited to 'modules-available/serversetup-bwlp/page.inc.php')
-rw-r--r-- | modules-available/serversetup-bwlp/page.inc.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules-available/serversetup-bwlp/page.inc.php b/modules-available/serversetup-bwlp/page.inc.php index 25a31f06..ba2e5433 100644 --- a/modules-available/serversetup-bwlp/page.inc.php +++ b/modules-available/serversetup-bwlp/page.inc.php @@ -279,6 +279,7 @@ class Page_ServerSetup extends Page $entry->addFormFields($params); $params['title'] = $row['title']; $params['oldentryid'] = $params['entryid'] = $row['entryid']; + $params['builtin'] = $row['builtin']; } Render::addTemplate('ipxe-new-boot-entry', $params); } @@ -543,7 +544,7 @@ class Page_ServerSetup extends Page } if ($entry === null) { Message::addError('main.empty-field'); - return; + Util::redirect('?do=serversetup&show=bootentry'); } $params = [ 'entryid' => $newId, @@ -560,10 +561,10 @@ class Page_ServerSetup extends Page // Edit existing entry $params['oldid'] = $oldEntryId; Database::exec('UPDATE serversetup_bootentry SET entryid = :entryid, title = :title, data = :data - WHERE entryid = :oldid AND builtin = 0', $params); - // TODO: Redirect to &show=bootentry + WHERE entryid = :oldid', $params); Message::addSuccess('boot-entry-updated', $newId); } + Util::redirect('?do=serversetup&show=bootentry'); } } |