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) ...@@ -1683,7 +1683,7 @@ function system_login_configure($verbose = false)
$output_enabled = count($console_selection) != 1 || !in_array('nullconsole', $console_selection); $output_enabled = count($console_selection) != 1 || !in_array('nullconsole', $console_selection);
$virtual_enabled = !count($console_selection) || in_array('vidconsole', $console_selection) || $virtual_enabled = !count($console_selection) || in_array('vidconsole', $console_selection) ||
in_array('efi', $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)) { if (count($console_selection)) {
$new_boot_config['console'] = '"' . implode(',', $console_selection) . '"'; $new_boot_config['console'] = '"' . implode(',', $console_selection) . '"';
......
...@@ -47,7 +47,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -47,7 +47,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig['nohttpreferercheck'] = isset($config['system']['webgui']['nohttpreferercheck']); $pconfig['nohttpreferercheck'] = isset($config['system']['webgui']['nohttpreferercheck']);
$pconfig['loginautocomplete'] = isset($config['system']['webgui']['loginautocomplete']); $pconfig['loginautocomplete'] = isset($config['system']['webgui']['loginautocomplete']);
$pconfig['althostnames'] = $config['system']['webgui']['althostnames']; $pconfig['althostnames'] = $config['system']['webgui']['althostnames'];
$pconfig['enableserial'] = isset($config['system']['enableserial']);
$pconfig['serialspeed'] = $config['system']['serialspeed']; $pconfig['serialspeed'] = $config['system']['serialspeed'];
$pconfig['primaryconsole'] = $config['system']['primaryconsole']; $pconfig['primaryconsole'] = $config['system']['primaryconsole'];
$pconfig['secondaryconsole'] = $config['system']['secondaryconsole']; $pconfig['secondaryconsole'] = $config['system']['secondaryconsole'];
...@@ -127,12 +126,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -127,12 +126,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
unset($config['system']['webgui']['noantilockout']); 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'])) { if (is_numeric($pconfig['serialspeed'])) {
$config['system']['serialspeed'] = $pconfig['serialspeed']; $config['system']['serialspeed'] = $pconfig['serialspeed'];
} elseif (isset($config['system']['serialspeed'])) { } elseif (isset($config['system']['serialspeed'])) {
...@@ -503,17 +496,7 @@ include("head.inc"); ...@@ -503,17 +496,7 @@ include("head.inc");
</td> </td>
</tr> </tr>
<tr> <tr>
<th colspan="2"><?=gettext("Serial Communications"); ?></th> <th colspan="2"><?=gettext("Console Options"); ?></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>
</tr> </tr>
<tr> <tr>
<td><a id="help_for_serialspeed" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Serial Speed")?></td> <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"); ...@@ -525,7 +508,7 @@ include("head.inc");
<option value="19200" <?=$pconfig['serialspeed'] == "19200" ? 'selected="selected"' : '' ?>>19200</option> <option value="19200" <?=$pconfig['serialspeed'] == "19200" ? 'selected="selected"' : '' ?>>19200</option>
<option value="14400" <?=$pconfig['serialspeed'] == "14400" ? 'selected="selected"' : '' ?>>14400</option> <option value="14400" <?=$pconfig['serialspeed'] == "14400" ? 'selected="selected"' : '' ?>>14400</option>
<option value="9600" <?=$pconfig['serialspeed'] == "9600" ? 'selected="selected"' : '' ?>>9600</option> <option value="9600" <?=$pconfig['serialspeed'] == "9600" ? 'selected="selected"' : '' ?>>9600</option>
</select> <?=gettext("bps");?> </select>
<div class="hidden" for="help_for_serialspeed"> <div class="hidden" for="help_for_serialspeed">
<?=gettext("Allows selection of different speeds for the serial console port."); ?> <?=gettext("Allows selection of different speeds for the serial console port."); ?>
</div> </div>
...@@ -560,9 +543,6 @@ include("head.inc"); ...@@ -560,9 +543,6 @@ include("head.inc");
</div> </div>
</td> </td>
</tr> </tr>
<tr>
<th colspan="2"><?=gettext("Console Options"); ?></th>
</tr>
<tr> <tr>
<td><i class="fa fa-info-circle text-muted"></i></a> <?= gettext("Console menu") ?></td> <td><i class="fa fa-info-circle text-muted"></i></a> <?= gettext("Console menu") ?></td>
<td width="78%"> <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