summaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorSimon Rettberg2014-05-24 18:42:23 +0200
committerSimon Rettberg2014-05-24 18:42:23 +0200
commitee27ec0d2bc44fece8b438a4ea58ac956198d300 (patch)
tree29c7e34925d5525a60fcfca081725cd4a845e635 /inc
parentStuff (WIP) (diff)
downloadslx-admin-ee27ec0d2bc44fece8b438a4ea58ac956198d300.tar.gz
slx-admin-ee27ec0d2bc44fece8b438a4ea58ac956198d300.tar.xz
slx-admin-ee27ec0d2bc44fece8b438a4ea58ac956198d300.zip
WIP
Diffstat (limited to 'inc')
-rw-r--r--inc/configmodule.inc.php3
-rw-r--r--inc/message.inc.php2
-rw-r--r--inc/property.inc.php10
-rw-r--r--inc/trigger.inc.php8
4 files changed, 17 insertions, 6 deletions
diff --git a/inc/configmodule.inc.php b/inc/configmodule.inc.php
index 55f76cf3..e9fa40bb 100644
--- a/inc/configmodule.inc.php
+++ b/inc/configmodule.inc.php
@@ -3,7 +3,7 @@
class ConfigModule
{
- public static function insertAdConfig($title, $server, $searchbase, $binddn, $bindpw)
+ public static function insertAdConfig($title, $server, $searchbase, $binddn, $bindpw, $home)
{
// TODO: Lock table, race condition if about 500 admins insert a config at the same time
Database::exec("INSERT INTO configtgz_module (title, moduletype, filepath, contents) "
@@ -31,6 +31,7 @@ class ConfigModule
'searchbase' => $searchbase,
'binddn' => $binddn,
'bindpw' => $bindpw,
+ 'home' => $home,
'proxyport' => $port
);
$data = json_encode($ownEntry);
diff --git a/inc/message.inc.php b/inc/message.inc.php
index 2ed9e79a..75292e09 100644
--- a/inc/message.inc.php
+++ b/inc/message.inc.php
@@ -31,7 +31,7 @@ $error_text = array(
'error-extract' => 'Konnte Archiv nicht nach {{0}} entpacken - {{1}}',
'module-added' => 'Modul erfolgreich hinzugefügt',
'module-deleted' => 'Modul {{0}} wurde gelöscht',
- 'module-in-use' => 'Modul <b>{{0}}</b> wird noch durch Konfiguration <b>{{1}}</b> verwendet',
+ 'module-in-use' => 'Modul {{0}} wird noch durch Konfiguration {{1}} verwendet',
'taskmanager-error' => 'Verbindung zum Taskmanager fehlgeschlagen',
'taskmanager-format' => 'Taskmanager hat ungültige Daten zurückgeliefert',
'task-error' => 'Ausführung fehlgeschlagen: {{0}}',
diff --git a/inc/property.inc.php b/inc/property.inc.php
index c6f3e8ad..d186193a 100644
--- a/inc/property.inc.php
+++ b/inc/property.inc.php
@@ -74,5 +74,15 @@ class Property
{
self::set('ipxe-task', $value);
}
+
+ public static function getBootMenu()
+ {
+ return json_decode(self::get('ipxe-menu'), true);
+ }
+
+ public static function setBootMenu($value)
+ {
+ self::set('ipxe-menu', json_encode($value));
+ }
}
diff --git a/inc/trigger.inc.php b/inc/trigger.inc.php
index 40d9c491..af12955f 100644
--- a/inc/trigger.inc.php
+++ b/inc/trigger.inc.php
@@ -25,12 +25,12 @@ class Trigger
$last = Property::getIPxeTaskId();
if ($last !== false) {
$status = Taskmanager::status($last);
- if (isset($status['statusCode']) && ($status['statusCode'] === TASK_WAITING || $status['statusCode'] === TASK_RUNNING))
+ if (isset($status['statusCode']) && ($status['statusCode'] === TASK_WAITING || $status['statusCode'] === TASK_PROCESSING))
return false; // Already compiling
}
- $task = Taskmanager::submit('CompileIPxe', array(
- 'ip' => Property::getServerIp()
- ));
+ $data = Property::getBootMenu();
+ $data['ip'] = Property::getServerIp();
+ $task = Taskmanager::submit('CompileIPxe', $data);
if (!isset($task['id']))
return false;
Property::setIPxeTaskId($task['id']);