diff options
author | jim-p <jimp@pfsense.org> | 2014-02-14 11:02:03 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2014-02-14 11:02:03 -0500 |
commit | 01c1576292cff8c367da2c9f1916f58506e39cdf (patch) | |
tree | 78fae0362eb3c9dae31786839ee67c183e08658a /etc/inc/pfsense-utils.inc | |
parent | 9525f7a6c8175bf6de9f0d70254f17d63f3af93a (diff) | |
download | pfsense-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/inc/pfsense-utils.inc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 10 |
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 . '"'; } |