add option to enable/disable generation of bind-configs for the system-hostname
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -2781,3 +2781,13 @@ if (isFroxlorVersion('0.9.32')) {
|
||||
|
||||
updateToVersion('0.9.33-dev1');
|
||||
}
|
||||
|
||||
if (isFroxlorVersion('0.9.33-dev1')) {
|
||||
showUpdateStep("Updating from 0.9.33-dev1 to 0.9.33-dev2", false);
|
||||
|
||||
showUpdateStep("Adding settings for hostname-dns-entry");
|
||||
Settings::AddNew("system.dns_createhostnameentry", isset($_POST['dns_createhostnameentry']) ? (int)$_POST['dns_createhostnameentry'] : '0');
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.33-dev2');
|
||||
}
|
||||
|
||||
@@ -668,4 +668,15 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version) {
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
if (versionInUpdate($current_version, '0.9.33-dev2')) {
|
||||
// only if bind is used - if not the default will be set, which is '0' (off)
|
||||
if (Settings::get('system.bind_enable') == 1) {
|
||||
$has_preconfig = true;
|
||||
$description = 'You can enable/disable the generation of the bind-zone / config for the system hostname.<br /><br />';
|
||||
$question = '<strong>Do you want to generate a bind-zone for the system-hostname? (default: no):</strong> ';
|
||||
$question.= makeyesno('dns_createhostnameentry', '1', '0', '0').'<br />';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user