summaryrefslogtreecommitdiffstats
path: root/inc/event.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/event.inc.php')
-rw-r--r--inc/event.inc.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/inc/event.inc.php b/inc/event.inc.php
index 66601607..4e68ab6d 100644
--- a/inc/event.inc.php
+++ b/inc/event.inc.php
@@ -24,6 +24,17 @@ class Event
Property::clearList('cron.key.status');
Property::clearList('cron.key.blocked');
+ // Hooks
+ foreach (Hook::load('bootup') as $hook) {
+ // Isolate for local vars
+ $fun = function() use ($hook) {
+ include_once($hook->file);
+ };
+ $fun();
+ }
+
+ // TODO: Modularize (hooks)
+
// Tasks: fire away
$mountStatus = false;
$mountId = Trigger::mount();
@@ -98,8 +109,7 @@ class Event
public static function serverIpChanged()
{
error_log('Server ip changed');
- global $tidIpxe;
- $tidIpxe = Trigger::ipxe();
+ Trigger::ipxe();
if (Module::isAvailable('sysconfig')) { // TODO: Modularize events
ConfigModule::serverIpChanged();
}
@@ -111,6 +121,8 @@ class Event
public static function activeConfigChanged()
{
$task = Trigger::ldadp();
+ if ($task === false)
+ return;
TaskmanagerCallback::addCallback($task, 'ldadpStartup');
}