mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Set default serial speed to 115200 for 2.2, fixes #3715
This commit is contained in:
parent
4b167dcd11
commit
4887afa18b
@ -988,6 +988,7 @@ function setup_serial_port($when="save", $path="") {
|
||||
else
|
||||
$boot_config = "";
|
||||
|
||||
$serialspeed = (is_numeric($config['system']['serialspeed'])) ? $config['system']['serialspeed'] : "115200";
|
||||
if(($g['platform'] != "cdrom") && ($g['platform'] != "nanobsd")) {
|
||||
$boot_config_split = explode("\n", $boot_config);
|
||||
$fd = fopen($boot_config_file,"w");
|
||||
@ -1001,7 +1002,7 @@ function setup_serial_port($when="save", $path="") {
|
||||
}
|
||||
}
|
||||
if(isset($config['system']['enableserial']) || $g['enableserial_force']) {
|
||||
fwrite($fd, "-D");
|
||||
fwrite($fd, "-S{$serialspeed} -D");
|
||||
}
|
||||
fclose($fd);
|
||||
}
|
||||
@ -1024,11 +1025,9 @@ function setup_serial_port($when="save", $path="") {
|
||||
&& (stripos($bcs, "hw.usb.no_pf") === false))
|
||||
$new_boot_config[] = $bcs;
|
||||
|
||||
$serialspeed = (is_numeric($config['system']['serialspeed'])) ? $config['system']['serialspeed'] : "9600";
|
||||
if(isset($config['system']['enableserial']) || $g['enableserial_force']) {
|
||||
$new_boot_config[] = 'boot_multicons="YES"';
|
||||
$new_boot_config[] = 'boot_serial="YES"';
|
||||
$new_boot_config[] = 'comconsole_speed="' . $serialspeed . '"';
|
||||
$primaryconsole = isset($g['primaryconsole_force']) ? $g['primaryconsole_force'] : $config['system']['primaryconsole'];
|
||||
switch ($primaryconsole) {
|
||||
case "video":
|
||||
@ -1038,10 +1037,8 @@ function setup_serial_port($when="save", $path="") {
|
||||
default:
|
||||
$new_boot_config[] = 'console="comconsole,vidconsole"';
|
||||
}
|
||||
} elseif ($g['platform'] == "nanobsd") {
|
||||
$new_boot_config[] = 'comconsole_speed="' . $serialspeed . '"';
|
||||
}
|
||||
|
||||
$new_boot_config[] = 'comconsole_speed="' . $serialspeed . '"';
|
||||
$new_boot_config[] = 'hw.usb.no_pf="1"';
|
||||
|
||||
file_put_contents($loader_conf_file, implode("\n", $new_boot_config) . "\n");
|
||||
|
||||
@ -539,7 +539,7 @@ function prot_change() {
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Serial Terminal"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="enableserial" type="checkbox" id="enableserial" value="yes" <?php if (isset($pconfig['enableserial'])) echo "checked=\"checked\""; ?> />
|
||||
<strong><?=gettext("Enables the first serial port with 9600/8/N/1 by default, or another speed selectable below."); ?></strong>
|
||||
<strong><?=gettext("Enables the first serial port with 115200/8/N/1 by default, or another speed selectable below."); ?></strong>
|
||||
<span class="vexpl"><?=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 <b>null modem</b> serial cable or adapter is required to use the serial console."); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
@ -548,12 +548,12 @@ function prot_change() {
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Serial Speed")?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<select name="serialspeed" id="serialspeed" class="formselect">
|
||||
<option value="9600" <?php if ($pconfig['serialspeed'] == "9600") echo "selected=\"selected\"";?>>9600</option>
|
||||
<option value="14400" <?php if ($pconfig['serialspeed'] == "14400") echo "selected=\"selected\"";?>>14400</option>
|
||||
<option value="19200" <?php if ($pconfig['serialspeed'] == "19200") echo "selected=\"selected\"";?>>19200</option>
|
||||
<option value="38400" <?php if ($pconfig['serialspeed'] == "38400") echo "selected=\"selected\"";?>>38400</option>
|
||||
<option value="57600" <?php if ($pconfig['serialspeed'] == "57600") echo "selected=\"selected\"";?>>57600</option>
|
||||
<option value="115200" <?php if ($pconfig['serialspeed'] == "115200") echo "selected=\"selected\"";?>>115200</option>
|
||||
<option value="57600" <?php if ($pconfig['serialspeed'] == "57600") echo "selected=\"selected\"";?>>57600</option>
|
||||
<option value="38400" <?php if ($pconfig['serialspeed'] == "38400") echo "selected=\"selected\"";?>>38400</option>
|
||||
<option value="19200" <?php if ($pconfig['serialspeed'] == "19200") echo "selected=\"selected\"";?>>19200</option>
|
||||
<option value="14400" <?php if ($pconfig['serialspeed'] == "14400") echo "selected=\"selected\"";?>>14400</option>
|
||||
<option value="9600" <?php if ($pconfig['serialspeed'] == "9600") echo "selected=\"selected\"";?>>9600</option>
|
||||
</select> bps
|
||||
<br /><?=gettext("Allows selection of different speeds for the serial console port."); ?>
|
||||
</td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user