summaryrefslogtreecommitdiffstats
path: root/etc/inc/pfsense-utils.inc
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 /etc/inc/pfsense-utils.inc
parent4b167dcd1130f99b7a707df817999ebf64b40311 (diff)
downloadpfsense-4887afa18b1cef26ed28b44ded38afc8b344767b.zip
pfsense-4887afa18b1cef26ed28b44ded38afc8b344767b.tar.gz
Set default serial speed to 115200 for 2.2, fixes #3715
Diffstat (limited to 'etc/inc/pfsense-utils.inc')
-rw-r--r--etc/inc/pfsense-utils.inc9
1 files changed, 3 insertions, 6 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");
OpenPOWER on IntegriCloud