summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-03-25 12:36:26 +0100
committerSimon Rettberg2019-03-25 12:36:26 +0100
commitd949130ff1c948ba85f501022e9a090cab305147 (patch)
treea07bcec323fbcec33de27573ff80e8f5f9c464d8
parent[serversetup-bwlp-ipxe] Redirect to serveraddr page if invalid (diff)
downloadslx-admin-d949130ff1c948ba85f501022e9a090cab305147.tar.gz
slx-admin-d949130ff1c948ba85f501022e9a090cab305147.tar.xz
slx-admin-d949130ff1c948ba85f501022e9a090cab305147.zip
[inc/Trigger] Wait for taskmanager on bootup
-rw-r--r--inc/event.inc.php2
-rw-r--r--inc/trigger.inc.php7
2 files changed, 7 insertions, 2 deletions
diff --git a/inc/event.inc.php b/inc/event.inc.php
index 4e68ab6d..0b84df16 100644
--- a/inc/event.inc.php
+++ b/inc/event.inc.php
@@ -37,8 +37,8 @@ class Event
// Tasks: fire away
$mountStatus = false;
- $mountId = Trigger::mount();
$autoIp = Trigger::autoUpdateServerIp();
+ $mountId = Trigger::mount();
$ldadpId = Trigger::ldadp();
$ipxeId = Trigger::ipxe();
diff --git a/inc/trigger.inc.php b/inc/trigger.inc.php
index e89a9a17..cc603719 100644
--- a/inc/trigger.inc.php
+++ b/inc/trigger.inc.php
@@ -50,7 +50,12 @@ class Trigger
*/
public static function autoUpdateServerIp()
{
- $task = Taskmanager::submit('LocalAddressesList');
+ for ($i = 0; $i < 5; ++$i) {
+ $task = Taskmanager::submit('LocalAddressesList');
+ if ($task !== false)
+ break;
+ sleep(1);
+ }
if ($task === false)
return false;
$task = Taskmanager::waitComplete($task, 10000);