diff options
author | Simon Rettberg | 2019-04-03 15:21:11 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-04-03 15:21:44 +0200 |
commit | a8e6efe82996fdda4a7cf0a62c825682509d124c (patch) | |
tree | 2bca2c8f9e53afcc9d0cacdd5b18083f484074e3 | |
parent | [serversetup-bwlp-ipxe] Use --nouser for OpenSLX iPXE (diff) | |
download | slx-admin-a8e6efe82996fdda4a7cf0a62c825682509d124c.tar.gz slx-admin-a8e6efe82996fdda4a7cf0a62c825682509d124c.tar.xz slx-admin-a8e6efe82996fdda4a7cf0a62c825682509d124c.zip |
[serversetup-bwlp-ipxe] Reset bwlp bootentries on install
-rw-r--r-- | modules-available/serversetup-bwlp-ipxe/inc/ipxe.inc.php | 6 | ||||
-rw-r--r-- | modules-available/serversetup-bwlp-ipxe/install.inc.php | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/modules-available/serversetup-bwlp-ipxe/inc/ipxe.inc.php b/modules-available/serversetup-bwlp-ipxe/inc/ipxe.inc.php index 2aecd70f..856ecfb5 100644 --- a/modules-available/serversetup-bwlp-ipxe/inc/ipxe.inc.php +++ b/modules-available/serversetup-bwlp-ipxe/inc/ipxe.inc.php @@ -329,10 +329,10 @@ class IPxe } } - private static function createDefaultEntries() + public static function createDefaultEntries() { Database::exec( 'INSERT IGNORE INTO serversetup_bootentry (entryid, hotkey, title, builtin, data) - VALUES (:entryid, :hotkey, :title, 1, :data)', + VALUES (:entryid, :hotkey, :title, 1, :data) ON DUPLICATE KEY UPDATE data = VALUES(data)', [ 'entryid' => 'bwlp-default', 'hotkey' => 'B', @@ -348,7 +348,7 @@ boot -a -r /boot/default/kernel initrd=initramfs-stage31 ${slxextra} slxbase=boo ]), ]); $query = 'INSERT IGNORE INTO serversetup_bootentry (entryid, hotkey, title, builtin, data) - VALUES (:entryid, :hotkey, :title, 1, :data)'; + VALUES (:entryid, :hotkey, :title, 1, :data) ON DUPLICATE KEY UPDATE data = VALUES(data)'; Database::exec($query, [ 'entryid' => 'bwlp-default-dbg', diff --git a/modules-available/serversetup-bwlp-ipxe/install.inc.php b/modules-available/serversetup-bwlp-ipxe/install.inc.php index 5e7f2440..dc6d145e 100644 --- a/modules-available/serversetup-bwlp-ipxe/install.inc.php +++ b/modules-available/serversetup-bwlp-ipxe/install.inc.php @@ -110,4 +110,6 @@ if (Module::get('location') !== false) { } } +IPxe::createDefaultEntries(); + responseFromArray($res); |