Commit 506c905c authored by Franco Fichtner's avatar Franco Fichtner

system: really remove enableserial

We always set primaryconsole in our images, which is enough
for the code to figure out that serial was enabled.  If a
user changed this, he will have to reconfigure to get the
expected result: primaryconsole set to something different
other than serial and secondaryconsole not set will obviously
not be enogh of a hint for a system to use the serial one.
parent 948bdc11
......@@ -1683,7 +1683,7 @@ function system_login_configure($verbose = false)
$output_enabled = count($console_selection) != 1 || !in_array('nullconsole', $console_selection);
$virtual_enabled = !count($console_selection) || in_array('vidconsole', $console_selection) ||
in_array('efi', $console_selection);
$serial_enabled = in_array('comconsole', $console_selection) || isset($config['system']['enableserial']);
$serial_enabled = in_array('comconsole', $console_selection);
if (count($console_selection)) {
$new_boot_config['console'] = '"' . implode(',', $console_selection) . '"';
......
......@@ -47,7 +47,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig['nohttpreferercheck'] = isset($config['system']['webgui']['nohttpreferercheck']);
$pconfig['loginautocomplete'] = isset($config['system']['webgui']['loginautocomplete']);
$pconfig['althostnames'] = $config['system']['webgui']['althostnames'];
$pconfig['enableserial'] = isset($config['system']['enableserial']);
$pconfig['serialspeed'] = $config['system']['serialspeed'];
$pconfig['primaryconsole'] = $config['system']['primaryconsole'];
$pconfig['secondaryconsole'] = $config['system']['secondaryconsole'];
......@@ -127,12 +126,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
unset($config['system']['webgui']['noantilockout']);
}
if ($pconfig['enableserial'] == "yes") {
$config['system']['enableserial'] = true;
} elseif (isset($config['system']['enableserial'])) {
unset($config['system']['enableserial']);
}
if (is_numeric($pconfig['serialspeed'])) {
$config['system']['serialspeed'] = $pconfig['serialspeed'];
} elseif (isset($config['system']['serialspeed'])) {
......@@ -503,17 +496,7 @@ include("head.inc");
</td>
</tr>
<tr>
<th colspan="2"><?=gettext("Serial Communications"); ?></th>
</tr>
<tr>
<td><a id="help_for_enableserial" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Serial Terminal"); ?></td>
<td width="78%">
<input name="enableserial" type="checkbox" id="enableserial" value="yes" <?=!empty($pconfig['enableserial']) ? "checked=\"checked\"" : "";?> />
<strong><?=gettext("Enable serial ports with 115200/8/N/1 by default, or another speed selectable below."); ?></strong>
<div class="hidden" for="help_for_enableserial">
<?=gettext("Note: This will redirect the console output and messages to the serial port. You can still access the console menu from the internal video card/keyboard. A null modem serial cable or adapter is required to use the serial console."); ?>
</div>
</td>
<th colspan="2"><?=gettext("Console Options"); ?></th>
</tr>
<tr>
<td><a id="help_for_serialspeed" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Serial Speed")?></td>
......@@ -525,7 +508,7 @@ include("head.inc");
<option value="19200" <?=$pconfig['serialspeed'] == "19200" ? 'selected="selected"' : '' ?>>19200</option>
<option value="14400" <?=$pconfig['serialspeed'] == "14400" ? 'selected="selected"' : '' ?>>14400</option>
<option value="9600" <?=$pconfig['serialspeed'] == "9600" ? 'selected="selected"' : '' ?>>9600</option>
</select> <?=gettext("bps");?>
</select>
<div class="hidden" for="help_for_serialspeed">
<?=gettext("Allows selection of different speeds for the serial console port."); ?>
</div>
......@@ -560,9 +543,6 @@ include("head.inc");
</div>
</td>
</tr>
<tr>
<th colspan="2"><?=gettext("Console Options"); ?></th>
</tr>
<tr>
<td><i class="fa fa-info-circle text-muted"></i></a> <?= gettext("Console menu") ?></td>
<td width="78%">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment