summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api.php3
-rw-r--r--inc/event.inc.php22
-rw-r--r--inc/property.inc.php9
-rw-r--r--inc/taskmanager.inc.php14
-rw-r--r--inc/trigger.inc.php8
-rw-r--r--inc/validator.inc.php2
-rw-r--r--lang/de/templates/main-menu.json6
-rw-r--r--lang/de/templates/page-news.json2
-rw-r--r--lang/de/templates/serversetup/ipxe.json5
-rw-r--r--lang/de/templates/serversetup/ipxe_update.json4
-rw-r--r--lang/en/templates/main-menu.json6
-rw-r--r--lang/en/templates/page-news.json2
-rw-r--r--lang/en/templates/serversetup/ipxe.json5
-rw-r--r--lang/en/templates/serversetup/ipxe_update.json4
-rw-r--r--lang/pt/templates/internetaccess/_page.json3
-rw-r--r--lang/pt/templates/internetaccess/restart.json3
-rw-r--r--lang/pt/templates/main-menu.json2
-rw-r--r--lang/pt/templates/page-news.json1
-rw-r--r--lang/pt/templates/serversetup/ipxe.json2
-rw-r--r--lang/pt/templates/serversetup/ipxe_update.json3
-rw-r--r--modules/backup.inc.php2
-rw-r--r--modules/serversetup.inc.php19
-rw-r--r--templates/main-menu.html2
-rw-r--r--templates/page-news.html4
-rw-r--r--templates/serversetup/ipxe.html18
-rw-r--r--templates/serversetup/ipxe_update.html20
26 files changed, 120 insertions, 51 deletions
diff --git a/api.php b/api.php
index faf6bed0..b7745c22 100644
--- a/api.php
+++ b/api.php
@@ -5,6 +5,9 @@ chdir(dirname($_SERVER['SCRIPT_FILENAME']));
require_once 'config.php';
+if (CONFIG_SQL_PASS === '%MYSQL_OPENSLX_PASS%')
+ exit(0); // Ignore API calls if not configured yet
+
// Autoload classes from ./inc which adhere to naming scheme <lowercasename>.inc.php
function slxAutoloader($class)
{
diff --git a/inc/event.inc.php b/inc/event.inc.php
index 376deb6f..95d75e33 100644
--- a/inc/event.inc.php
+++ b/inc/event.inc.php
@@ -26,8 +26,7 @@ class Event
$mountId = Trigger::mount();
$autoIp = Trigger::autoUpdateServerIp();
$ldadpId = Trigger::ldadp();
- $ipxeId = Trigger::ipxe();
-
+
Taskmanager::submit('DozmodLauncher', array(
'operation' => 'start'
));
@@ -60,23 +59,12 @@ class Event
EventLog::failure("The server's IP address could not be determined automatically, and there is no valid address configured.");
$everythingFine = false;
}
- // iPXE generation
- if ($ipxeId === false) {
- EventLog::failure('Cannot generate PXE menu: Taskmanager unreachable!');
- $everythingFine = false;
- } else {
- $res = Taskmanager::waitComplete($ipxeId, 5000);
- if (Taskmanager::isFailed($res)) {
- EventLog::failure('Update PXE Menu failed', $res['data']['error']);
- $everythingFine = false;
- }
- }
// Just so we know booting is done (and we don't expect any more errors from booting up)
if ($everythingFine) {
EventLog::info('Bootup finished without errors.');
} else {
- EventLog::info('There were errors during bootup. Maybe the server is not fully configured yet.');
+ EventLog::warning('There were errors during bootup. Maybe the server is not fully configured yet.');
}
}
@@ -85,9 +73,11 @@ class Event
*/
public static function serverIpChanged()
{
- Trigger::rebuildAdModules();
+ global $tidAdModules, $tidIpxe;
+ $tidAdModules = Trigger::rebuildAdModules();
+ $tidIpxe = Trigger::ipxe();
}
-
+
/**
* The activated configuration changed.
*/
diff --git a/inc/property.inc.php b/inc/property.inc.php
index afbdf0de..dd70b8d4 100644
--- a/inc/property.inc.php
+++ b/inc/property.inc.php
@@ -59,9 +59,10 @@ class Property
public static function setServerIp($value)
{
- if ($value !== self::getServerIp())
- Event::serverIpChanged();
+ if ($value === self::getServerIp())
+ return false;
self::set('server-ip', $value);
+ Event::serverIpChanged();
}
public static function getBootMenu()
@@ -159,12 +160,12 @@ class Property
{
return self::get('last-warn-event-id', 0);
}
-
+
public static function setNeedsSetup($value)
{
self::set('needs-setup', $value);
}
-
+
public static function getNeedsSetup()
{
return self::get('needs-setup');
diff --git a/inc/taskmanager.inc.php b/inc/taskmanager.inc.php
index 528b3f78..dd16c62d 100644
--- a/inc/taskmanager.inc.php
+++ b/inc/taskmanager.inc.php
@@ -80,6 +80,20 @@ class Taskmanager
}
/**
+ * Checks whether the given task id corresponds to a known task in the taskmanager.
+ * Returns true iff the taskmanager is reachable and the status of the task
+ * is different from NO_SUCH_TASK.
+ *
+ * @param string $taskid a task id
+ * @return boolean true if taskid exists in taskmanager
+ */
+ public static function isTask($taskid)
+ {
+ $task = self::status($taskid);
+ return isset($task['statusCode']) && $task['statusCode'] !== NO_SUCH_TASK;
+ }
+
+ /**
* Wait for the given task's completion.
*
* @param type $task task to wait for
diff --git a/inc/trigger.inc.php b/inc/trigger.inc.php
index ce56c815..790323b5 100644
--- a/inc/trigger.inc.php
+++ b/inc/trigger.inc.php
@@ -15,12 +15,12 @@ class Trigger
* Compile iPXE pxelinux menu. Needs to be done whenever the server's IP
* address changes.
*
- * @param boolean $force force recompilation even if it seems up to date
- * @return boolean|string true if already up to date, false if launching task failed, task-id otherwise
+ * @return boolean|string false if launching task failed, task-id otherwise
*/
public static function ipxe()
{
$data = Property::getBootMenu();
+ $data['ipaddress'] = Property::getServerIp();
$task = Taskmanager::submit('CompileIPxe', $data);
if (!isset($task['id']))
return false;
@@ -155,7 +155,7 @@ class Trigger
'password' => $vmstore['cifspasswd']
));
}
-
+
/**
* Check and process all callbacks
*/
@@ -214,7 +214,7 @@ class Trigger
}
return $parent;
}
-
+
public static function startDaemons($parent, &$taskids)
{
$parent = self::triggerDaemons('start', $parent, $taskids);
diff --git a/inc/validator.inc.php b/inc/validator.inc.php
index 944ac2ef..20b843d7 100644
--- a/inc/validator.inc.php
+++ b/inc/validator.inc.php
@@ -40,7 +40,7 @@ class Validator
{
if (empty($value))
return '';
- if (preg_match('/^\$6\$.+\$./', $value))
+ if (preg_match('/^\$[156]\$.+\$./', $value))
return $value;
return Crypto::hash6($value);
}
diff --git a/lang/de/templates/main-menu.json b/lang/de/templates/main-menu.json
index 36ecf597..f988f69a 100644
--- a/lang/de/templates/main-menu.json
+++ b/lang/de/templates/main-menu.json
@@ -1,9 +1,8 @@
{
- "lang_administration": "\u00dcbersetzungen",
"lang_backup": "Backup\/Restore",
"lang_client": "Client",
"lang_clientLog": "Client Log",
- "lang_configurationBasic": "Grundkonfiguration",
+ "lang_configurationBasic": "PXE\/Boot",
"lang_configurationVariables": "KonfigurationsVariablen",
"lang_eventLog": "Server Log",
"lang_internetAccess": "Internetzugriff",
@@ -12,11 +11,12 @@
"lang_login": "Anmelden",
"lang_logout": "Abmelden",
"lang_needsSetup": "Einrichtung unvollst\u00e4ndig",
- "lang_news": "News",
+ "lang_news": "vmChooser News",
"lang_server": "Server",
"lang_serverStatus": "Server Status",
"lang_settings": "Einstellungen",
"lang_status": "Status",
+ "lang_translations": "\u00dcbersetzungen",
"lang_vmLocation": "VM Speicherort",
"lang_warning": "Warnung"
} \ No newline at end of file
diff --git a/lang/de/templates/page-news.json b/lang/de/templates/page-news.json
index b25a6b46..d1cf877e 100644
--- a/lang/de/templates/page-news.json
+++ b/lang/de/templates/page-news.json
@@ -1,8 +1,8 @@
{
- "lang_activeNews": "Aktive News",
"lang_content": "Inhalt",
"lang_date": "Datum",
"lang_delete": "L\u00f6schen",
+ "lang_editNews": "News bearbeiten",
"lang_latestUpdate": "Letzte Aktualisierung",
"lang_newsIntro": "Hier haben Sie die M\u00f6glichkeit, die von bwLehrpool-Clients angezeigten News zu editieren.",
"lang_newsOld": "Alte News",
diff --git a/lang/de/templates/serversetup/ipxe.json b/lang/de/templates/serversetup/ipxe.json
index 36e49d31..54a3408b 100644
--- a/lang/de/templates/serversetup/ipxe.json
+++ b/lang/de/templates/serversetup/ipxe.json
@@ -4,12 +4,15 @@
"lang_bootMenu": "Bootmen\u00fc",
"lang_bootMenuCreate": "Bootmen\u00fc erzeugen",
"lang_close": "Schlie\u00dfen",
+ "lang_customEntry": "Eigener Eintrag",
"lang_example": "Beispiel",
"lang_localHDD": "Lokale HDD",
+ "lang_masterPassword": "Master-Passwort",
+ "lang_masterPasswordHelp": "Das Master-Passwort wird ben\u00f6tigt, um einen Booteintrag direkt am Client tempor\u00e4r durch Dr\u00fccken der Tab-Taste zu editieren. Da dies f\u00fcr Manipulation am Client genutzt werden kann, sollte diese Funktion unbedingt mit einem Passwort gesch\u00fctzt werden.",
"lang_menuCustom": "Benutzerdefinierter Men\u00fczusatz",
"lang_menuCustomHint1": "Hier haben Sie die M\u00f6glichkeit, eigenen Men\u00fc-Code zum angezeigten PXE-Men\u00fc hinzuzuf\u00fcgen, um z.B. auf weitere PXE-Server zu verweisen. Das Format entspricht dem syslinux Men\u00fcformat.",
"lang_menuCustomHint2": "Sie k\u00f6nnen ein oder mehrere Eintr\u00e4ge erzeugen. Wenn Sie einen Eintrag erzeugen m\u00f6chten, der automatisch gestartet wird, wenn der Benutzer keine Auswahl t\u00e4tigt, vergeben Sie als",
- "lang_menuCustomHint3": "und w\u00e4hlen Sie als Standard-Bootverhalten ebenfalls my-entry.",
+ "lang_menuCustomHint3": "und w\u00e4hlen Sie als Standard-Bootverhalten ebenfalls custom.",
"lang_menuDisplayTime": "Anzeigedauer des Men\u00fcs",
"lang_seconds": "Sekunden"
} \ No newline at end of file
diff --git a/lang/de/templates/serversetup/ipxe_update.json b/lang/de/templates/serversetup/ipxe_update.json
new file mode 100644
index 00000000..b984de19
--- /dev/null
+++ b/lang/de/templates/serversetup/ipxe_update.json
@@ -0,0 +1,4 @@
+{
+ "lang_generationFailed": "Erzeugen des Bootmen\u00fcs fehlgeschlagen. Der Netzwerkboot von bwLehrpool wird wahrscheinlich nicht funktionieren. Wenn Sie den Fehler nicht selbst beheben k\u00f6nnen, melden Sie bitte obenstehende Fehlermeldung an das bwLehrpool-Projekt.",
+ "lang_menuGeneration": "Erzeugen des Bootmen\u00fcs"
+} \ No newline at end of file
diff --git a/lang/en/templates/main-menu.json b/lang/en/templates/main-menu.json
index 50ffabb5..f91e0784 100644
--- a/lang/en/templates/main-menu.json
+++ b/lang/en/templates/main-menu.json
@@ -1,9 +1,8 @@
{
- "lang_administration": "Translations",
"lang_backup": "Backup\/Restore",
"lang_client": "Client",
"lang_clientLog": "Client Log",
- "lang_configurationBasic": "Basic Configuration",
+ "lang_configurationBasic": "PXE\/Boot",
"lang_configurationVariables": "Configuration Variables",
"lang_eventLog": "Server Log",
"lang_internetAccess": "Internet access",
@@ -12,11 +11,12 @@
"lang_login": "Login",
"lang_logout": "Logout",
"lang_needsSetup": "Setup incomplete",
- "lang_news": "News",
+ "lang_news": "vmChooser news",
"lang_server": "Server",
"lang_serverStatus": "Server status",
"lang_settings": "Settings",
"lang_status": "Status",
+ "lang_translations": "Translations",
"lang_vmLocation": "VM Location",
"lang_warning": "Warning"
} \ No newline at end of file
diff --git a/lang/en/templates/page-news.json b/lang/en/templates/page-news.json
index ab925ccc..df63658c 100644
--- a/lang/en/templates/page-news.json
+++ b/lang/en/templates/page-news.json
@@ -1,8 +1,8 @@
{
- "lang_activeNews": "Active News",
"lang_content": "Content",
"lang_date": "Date",
"lang_delete": "Delete",
+ "lang_editNews": "Edit news",
"lang_latestUpdate": "Latest update",
"lang_newsIntro": "Here you have the possibility to edit the news displayed to the bwLehrpool clients.",
"lang_newsOld": "Old News",
diff --git a/lang/en/templates/serversetup/ipxe.json b/lang/en/templates/serversetup/ipxe.json
index 1ab18e14..39bb0d54 100644
--- a/lang/en/templates/serversetup/ipxe.json
+++ b/lang/en/templates/serversetup/ipxe.json
@@ -4,12 +4,15 @@
"lang_bootMenu": "Boot Menu",
"lang_bootMenuCreate": "Create Boot Menu",
"lang_close": "Close",
+ "lang_customEntry": "Custom entry",
"lang_example": "Example",
"lang_localHDD": "Local HDD",
+ "lang_masterPassword": "Master password",
+ "lang_masterPasswordHelp": "The master password is required to edit a boot menu entry. This should be set for security reasons.",
"lang_menuCustom": "Custom Extra Menu",
"lang_menuCustomHint1": "Here you have the opportunity to add your own menu code to the displayed PXE menu, eg to refer to other PXE server. The format corresponds to the syslinux menu format.",
"lang_menuCustomHint2": "You can create one or more entries. If you want to create an entry that starts automatically when the user makes a selection, assign as",
- "lang_menuCustomHint3": "and select as the default boot behavior my-entry as well.",
+ "lang_menuCustomHint3": "and select as the default boot behavior custom as well.",
"lang_menuDisplayTime": "Menu Display Time",
"lang_seconds": "Seconds"
} \ No newline at end of file
diff --git a/lang/en/templates/serversetup/ipxe_update.json b/lang/en/templates/serversetup/ipxe_update.json
new file mode 100644
index 00000000..b33b12dd
--- /dev/null
+++ b/lang/en/templates/serversetup/ipxe_update.json
@@ -0,0 +1,4 @@
+{
+ "lang_generationFailed": "Could not generate boot menu. The bwLehrpool-System might not work properly. If you can't fix the problem, please report the error message above to the bwLehrpool project.",
+ "lang_menuGeneration": "Generating boot menu..."
+} \ No newline at end of file
diff --git a/lang/pt/templates/internetaccess/_page.json b/lang/pt/templates/internetaccess/_page.json
new file mode 100644
index 00000000..c44dc44f
--- /dev/null
+++ b/lang/pt/templates/internetaccess/_page.json
@@ -0,0 +1,3 @@
+[
+
+] \ No newline at end of file
diff --git a/lang/pt/templates/internetaccess/restart.json b/lang/pt/templates/internetaccess/restart.json
new file mode 100644
index 00000000..c44dc44f
--- /dev/null
+++ b/lang/pt/templates/internetaccess/restart.json
@@ -0,0 +1,3 @@
+[
+
+] \ No newline at end of file
diff --git a/lang/pt/templates/main-menu.json b/lang/pt/templates/main-menu.json
index 32cc418d..7b0d868a 100644
--- a/lang/pt/templates/main-menu.json
+++ b/lang/pt/templates/main-menu.json
@@ -1,5 +1,4 @@
{
- "lang_administration": "Tradu\u00e7\u00f5es",
"lang_client": "Cliente",
"lang_clientLog": "Log dos Clientes",
"lang_configurationBasic": "Comfigura\u00e7\u00e3o B\u00e1sica",
@@ -14,5 +13,6 @@
"lang_serverStatus": "Server status",
"lang_settings": "Op\u00e7\u00f5es",
"lang_status": "Status",
+ "lang_translations": "Tradu\u00e7\u00f5es",
"lang_vmLocation": "Localiza\u00e7\u00e3o da VM"
} \ No newline at end of file
diff --git a/lang/pt/templates/page-news.json b/lang/pt/templates/page-news.json
index 3c03cb34..5a994d35 100644
--- a/lang/pt/templates/page-news.json
+++ b/lang/pt/templates/page-news.json
@@ -1,5 +1,4 @@
{
- "lang_activeNews": "Novidades",
"lang_content": "Conte\u00fado",
"lang_date": "Data",
"lang_delete": "Excluir",
diff --git a/lang/pt/templates/serversetup/ipxe.json b/lang/pt/templates/serversetup/ipxe.json
index 4c0c8fa5..c38dd60c 100644
--- a/lang/pt/templates/serversetup/ipxe.json
+++ b/lang/pt/templates/serversetup/ipxe.json
@@ -9,7 +9,7 @@
"lang_menuCustom": "Menu Adicional Customizado",
"lang_menuCustomHint1": "Aqui voc\u00ea tem a oportunidade de adicionar seu pr\u00f3prio c\u00f3digo de menu para o menu PXE exibido, por exemplo, para se referir a outro servidor PXE. O formato corresponde ao formato de menu syslinux.",
"lang_menuCustomHint2": "Voc\u00ea pode criar uma ou mais entradas. Se voc\u00ea quiser criar uma entrada que \u00e9 iniciada automaticamente quando o usu\u00e1rio faz uma sele\u00e7\u00e3o, atribua como",
- "lang_menuCustomHint3": "e selecione como o comportamento de boot padr\u00e3o tamb\u00e9m my-entry.",
+ "lang_menuCustomHint3": "e selecione como o comportamento de boot padr\u00e3o tamb\u00e9m custom.",
"lang_menuDisplayTime": "Tempo de Exibi\u00e7\u00e3o do Menu",
"lang_seconds": "Segundos"
} \ No newline at end of file
diff --git a/lang/pt/templates/serversetup/ipxe_update.json b/lang/pt/templates/serversetup/ipxe_update.json
new file mode 100644
index 00000000..c44dc44f
--- /dev/null
+++ b/lang/pt/templates/serversetup/ipxe_update.json
@@ -0,0 +1,3 @@
+[
+
+] \ No newline at end of file
diff --git a/modules/backup.inc.php b/modules/backup.inc.php
index e3652ebe..e35aeed2 100644
--- a/modules/backup.inc.php
+++ b/modules/backup.inc.php
@@ -84,7 +84,7 @@ class Page_Backup extends Page
Util::redirect('?do=Backup');
}
// Got uploaded file, now shut down all the daemons etc.
- $parent = Trigger::stopDaemons(null, &$this->templateData);
+ $parent = Trigger::stopDaemons(null, $this->templateData);
// Unmount store
$task = Taskmanager::submit('MountVmStore', array(
'address' => 'null',
diff --git a/modules/serversetup.inc.php b/modules/serversetup.inc.php
index b13fc90d..93d373c1 100644
--- a/modules/serversetup.inc.php
+++ b/modules/serversetup.inc.php
@@ -41,6 +41,11 @@ class Page_ServerSetup extends Page
{
Render::setTitle(Dictionary::translate('lang_serverConfiguration'));
+ $taskid = Request::any('taskid');
+ if ($taskid !== false && Taskmanager::isTask($taskid)) {
+ Render::addTemplate('serversetup/ipxe_update', array('taskid' => $taskid));
+ }
+
Render::addTemplate('serversetup/ipaddress', array(
'ips' => $this->taskStatus['data']['addresses']
));
@@ -100,6 +105,9 @@ class Page_ServerSetup extends Page
}
if ($valid) {
Property::setServerIp($newAddress);
+ global $tidIpxe;
+ if (isset($tidIpxe) && $tidIpxe !== false)
+ Util::redirect('?do=ServerSetup&taskid=' . $tidIpxe);
} else {
Message::addError('invalid-ip', $newAddress);
}
@@ -110,16 +118,19 @@ class Page_ServerSetup extends Page
{
$timeout = Request::post('timeout', 10);
if ($timeout === '')
- $timeout = 10;
- if (!is_numeric($timeout)) {
+ $timeout = 0;
+ if (!is_numeric($timeout) || $timeout < 0) {
Message::addError('value-invalid', 'timeout', $timeout);
}
$this->currentMenu['defaultentry'] = Request::post('defaultentry', 'net');
$this->currentMenu['timeout'] = $timeout;
$this->currentMenu['custom'] = Request::post('custom', '');
+ $this->currentMenu['masterpassword'] = Request::post('masterpassword', '');
+ if (!preg_match('/^\$[1456]\$.+\$/', $this->currentMenu['masterpassword']))
+ $this->currentMenu['masterpassword'] = Crypto::hash6($this->currentMenu['masterpassword']);
Property::setBootMenu($this->currentMenu);
- Trigger::ipxe();
- Util::redirect('?do=ServerSetup');
+ $id = Trigger::ipxe();
+ Util::redirect('?do=ServerSetup&taskid=' . $id);
}
}
diff --git a/templates/main-menu.html b/templates/main-menu.html
index 518db2d5..7bb030d6 100644
--- a/templates/main-menu.html
+++ b/templates/main-menu.html
@@ -19,7 +19,6 @@
<li><a href="?do=SysConfig">{{lang_localization}}</a></li>
<li><a href="?do=MiniLinux">bwLehrpool Mini-Linux</a></li>
<li><a href="?do=BaseConfig">{{lang_configurationVariables}}</a></li>
- <li><a href="?do=Translation">{{lang_administration}}</a></li>
<li class="divider"></li>
<li class="dropdown-header">{{lang_server}}</li>
<li><a href="?do=ServerSetup">{{lang_configurationBasic}}</a></li>
@@ -39,6 +38,7 @@
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><img src="lang/{{current_lang}}/flag.png"><b class="caret"></b></a>
<ul class="dropdown-menu">
+ <li><a href="?do=Translation">{{lang_translations}}</a></li>
<li class="dropdown-header">{{lang_language}}</li>
{{#langs}}
<li><a href="?lang={{cc}}&amp;url={{url}}"><img src="lang/{{cc}}/flag.png" alt="{{name}}"> {{name}}</a></li>
diff --git a/templates/page-news.html b/templates/page-news.html
index 0c56069c..8e400498 100644
--- a/templates/page-news.html
+++ b/templates/page-news.html
@@ -1,9 +1,9 @@
-<p>{{lang_newsIntro}}</p>
<div class="panel panel-default">
<div class="panel-heading">
- {{lang_activeNews}}
+ {{lang_editNews}}
</div>
<div class="panel-body">
+ <p>{{lang_newsIntro}}</p>
<form action="?do=News&amp;action=save" method="post">
<div class="form-group">
<label for="news-title-id">{{lang_title}}</label>
diff --git a/templates/serversetup/ipxe.html b/templates/serversetup/ipxe.html
index 21f3d87b..ec8ddc2f 100644
--- a/templates/serversetup/ipxe.html
+++ b/templates/serversetup/ipxe.html
@@ -15,7 +15,7 @@
<strong>{{lang_bootBehavior}}</strong>
<label class="radio"><input type="radio" name="defaultentry" value="net" {{active-net}}> bwLehrpool</label>
<label class="radio"><input type="radio" name="defaultentry" value="hdd" {{active-hdd}}> {{lang_localHDD}}</label>
- <label class="radio"><input type="radio" name="defaultentry" value="custom" {{active-custom}}> &quot;my-entry&quot;</label>
+ <label class="radio"><input type="radio" name="defaultentry" value="custom" {{active-custom}}> {{lang_customEntry}} (&quot;custom&quot;)</label>
</div>
<div class="form-group">
@@ -27,8 +27,16 @@
</div>
<div class="form-group">
+ <strong>{{lang_masterPassword}}</strong>
+ <div class="form-narrow">
+ <input type="text" class="form-control" name="masterpassword" value="{{masterpassword}}">
+ </div>
+ <i>{{lang_masterPasswordHelp}}</i>
+ </div>
+
+ <div class="form-group">
<strong>{{lang_menuCustom}}</strong> <a class="btn btn-default btn-xs" data-toggle="modal" data-target="#help-custom"><span class="glyphicon glyphicon-question-sign"></span></a>
- <textarea class="form-control" name="custom">{{custom}}</textarea>
+ <textarea class="form-control" name="custom" rows="8">{{custom}}</textarea>
</div>
</div>
@@ -45,13 +53,13 @@
<div class="modal-body">
{{lang_menuCustomHint1}}
<br>{{lang_example}}:
- <pre>LABEL my-entry
- MENU LABEL ^My Entry
+ <pre>LABEL custom
+ MENU LABEL ^My Boot Entry
KERNEL http://1.2.3.4/kernel
INITRD http://1.2.3.4/initramfs-stage31
APPEND custom=option
IPAPPEND 3</pre>
- {{lang_menuCustomHint2}} LABEL <strong>my-entry</strong>
+ {{lang_menuCustomHint2}} LABEL <strong>custom</strong>
{{lang_menuCustomHint3}}
</div>
<div class="modal-footer"><a class="btn btn-primary" data-dismiss="modal">{{lang_close}}</a></div>
diff --git a/templates/serversetup/ipxe_update.html b/templates/serversetup/ipxe_update.html
new file mode 100644
index 00000000..9c598667
--- /dev/null
+++ b/templates/serversetup/ipxe_update.html
@@ -0,0 +1,20 @@
+<div class="panel panel-default">
+ <div class="panel-heading">{{lang_menuGeneration}}</div>
+ <div class="panel-body">
+ <div data-tm-id="{{taskid}}" data-tm-log="error" data-tm-callback="restartCb">{{lang_menuGeneration}}</div>
+ <div id="genfailed" class="alert alert-danger" style="display:none">
+ {{lang_generationFailed}}
+ </div>
+ </div>
+</div>
+
+<script type="text/javascript">
+ function restartCb(task)
+ {
+ if (!task || !task.statusCode)
+ return;
+ if (task.statusCode === 'TASK_ERROR') {
+ $('#genfailed').show('slow');
+ }
+ }
+</script>