diff options
author | Simon Rettberg | 2019-10-09 17:31:19 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-10-09 17:31:19 +0200 |
commit | f800abeea4f6c68182c51cd4aaea19d7636431c8 (patch) | |
tree | 802f9bcee14210b355cac211751449e31c71fbc0 /modules-available/minilinux/hooks/ipxe-bootentry.inc.php | |
parent | slx-fixes: Expose function for adding additional automatic confirm handlers (diff) | |
download | slx-admin-f800abeea4f6c68182c51cd4aaea19d7636431c8.tar.gz slx-admin-f800abeea4f6c68182c51cd4aaea19d7636431c8.tar.xz slx-admin-f800abeea4f6c68182c51cd4aaea19d7636431c8.zip |
[minilinux] Rewrite for multiple version/sources handling
* You can supply multiple sources for updates (URLs)
* Sources can provide multiple branches
* Each branch can supply multiple versions (eg. updates)
TODO: Set global default version
TODO: Supply hook to serversetup-ipxe to add specific boot entries
TODO: UX polish
TODO: phpdoc/polish
Diffstat (limited to 'modules-available/minilinux/hooks/ipxe-bootentry.inc.php')
-rw-r--r-- | modules-available/minilinux/hooks/ipxe-bootentry.inc.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/modules-available/minilinux/hooks/ipxe-bootentry.inc.php b/modules-available/minilinux/hooks/ipxe-bootentry.inc.php new file mode 100644 index 00000000..4e2cbb5e --- /dev/null +++ b/modules-available/minilinux/hooks/ipxe-bootentry.inc.php @@ -0,0 +1,42 @@ +<?php + +class Wurst extends BootEntryHook +{ + + public function name() + { + return 'Wurst'; + } + + /** + * @return HookEntryGroup[] + */ + protected function groupsInternal() + { + return [ + new HookEntryGroup('Senf Gruppe', [ + new HookEntry('senf-1', 'Senf v1'), + new HookEntry('senf-2', 'Senf v2'), + ]), + new HookEntryGroup('Schnecke Gruppe', [ + new HookEntry('s-1', 'Trulla'), + new HookEntry('s-2', 'Herbert'), + ]), + ]; + } + + /** + * @param $id + * @return BootEntry the actual boot entry instance for given entry, false if invalid id + */ + public function getBootEntry($id) + { + $bios = new ExecData(); + $bios->executable = 'mspaint.exe'; + $bios->initRd = 'www.google.de'; + $bios->commandLine = '-q'; + return BootEntry::newStandardBootEntry($bios, false, 'agnostic'); + } +} + +return new Wurst();
\ No newline at end of file |