summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-06-26 16:44:47 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-06-26 16:44:47 -0300
commit4887afa18b1cef26ed28b44ded38afc8b344767b (patch)
tree56da35878cdd0048fd86f8f6e0a58580ad5073e7
parent4b167dcd1130f99b7a707df817999ebf64b40311 (diff)
downloadpfsense-4887afa18b1cef26ed28b44ded38afc8b344767b.zip
pfsense-4887afa18b1cef26ed28b44ded38afc8b344767b.tar.gz
Set default serial speed to 115200 for 2.2, fixes #3715
-rw-r--r--etc/inc/pfsense-utils.inc9
-rw-r--r--usr/local/www/system_advanced_admin.php12
2 files changed, 9 insertions, 12 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 27ba728..413df79 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -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");
diff --git a/usr/local/www/system_advanced_admin.php b/usr/local/www/system_advanced_admin.php
index d9fd453..79cdca8 100644
--- a/usr/local/www/system_advanced_admin.php
+++ b/usr/local/www/system_advanced_admin.php
@@ -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>
OpenPOWER on IntegriCloud