diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 52c4519f3c..4334783c79 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1020,7 +1020,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 . '"';
}
diff --git a/usr/local/www/system_advanced_admin.php b/usr/local/www/system_advanced_admin.php
index 01e64f08f1..d2074d7e45 100644
--- a/usr/local/www/system_advanced_admin.php
+++ b/usr/local/www/system_advanced_admin.php
@@ -63,6 +63,7 @@ $pconfig['noautocomplete'] = isset($config['system']['webgui']['noautocomplete']
$pconfig['althostnames'] = $config['system']['webgui']['althostnames'];
$pconfig['enableserial'] = $config['system']['enableserial'];
$pconfig['serialspeed'] = $config['system']['serialspeed'];
+$pconfig['primaryconsole'] = $config['system']['primaryconsole'];
$pconfig['enablesshd'] = $config['system']['enablesshd'];
$pconfig['sshport'] = $config['system']['ssh']['port'];
$pconfig['sshdkeyonly'] = isset($config['system']['ssh']['sshdkeyonly']);
@@ -157,6 +158,11 @@ if ($_POST) {
else
unset($config['system']['serialspeed']);
+ if ($_POST['primaryconsole'])
+ $config['system']['primaryconsole'] = $_POST['primaryconsole'];
+ else
+ unset($config['system']['primaryconsole']);
+
if ($_POST['nodnsrebindcheck'] == "yes")
$config['system']['webgui']['nodnsrebindcheck'] = true;
else
@@ -549,6 +555,18 @@ function prot_change() {
=gettext("Allows selection of different speeds for the serial console port."); ?>
+
+