summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2014-02-14 11:02:03 -0500
committerjim-p <jimp@pfsense.org>2014-02-14 11:02:03 -0500
commit01c1576292cff8c367da2c9f1916f58506e39cdf (patch)
tree78fae0362eb3c9dae31786839ee67c183e08658a /etc
parent9525f7a6c8175bf6de9f0d70254f17d63f3af93a (diff)
downloadpfsense-01c1576292cff8c367da2c9f1916f58506e39cdf.zip
pfsense-01c1576292cff8c367da2c9f1916f58506e39cdf.tar.gz
Add a knob to let the user select which console (video or serial) is preferred in cases where there are multiple consoles present. Also provide a way to force this preference.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc10
1 files changed, 9 insertions, 1 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 0737946..cd03d69 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1016,7 +1016,15 @@ function setup_serial_port($when="save", $path="") {
$new_boot_config[] = 'boot_multicons="YES"';
$new_boot_config[] = 'boot_serial="YES"';
$new_boot_config[] = 'comconsole_speed="' . $serialspeed . '"';
- $new_boot_config[] = 'console="comconsole,vidconsole"';
+ $primaryconsole = isset($g['primaryconsole_force']) ? $g['primaryconsole_force'] : $config['system']['primaryconsole'];
+ switch ($primaryconsole) {
+ case "video":
+ $new_boot_config[] = 'console="vidconsole,comconsole"';
+ break;
+ case "serial":
+ default:
+ $new_boot_config[] = 'console="comconsole,vidconsole"';
+ }
} elseif ($g['platform'] == "nanobsd") {
$new_boot_config[] = 'comconsole_speed="' . $serialspeed . '"';
}
OpenPOWER on IntegriCloud