summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-07-01 14:11:53 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-07-01 14:11:53 -0300
commitc5f9fb72655ce9b87ba7a8dad5cadeb1acd20150 (patch)
treedf31a2bcdf4af0794b5ecd1809525d7fb617f93e
parente6e3e0ee0ed906c19144f7dbadcc62dc31a8ec67 (diff)
downloadpfsense-c5f9fb72655ce9b87ba7a8dad5cadeb1acd20150.zip
pfsense-c5f9fb72655ce9b87ba7a8dad5cadeb1acd20150.tar.gz
Make proper checks to check if we should or not enable serial console
-rw-r--r--etc/inc/pfsense-utils.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index c02beb9..98903a8 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -975,7 +975,14 @@ function setup_serial_port($when="save", $path="") {
$ttys = file_get_contents("/etc/ttys");
$ttys_split = explode("\n", $ttys);
$fd = fopen("/etc/ttys", "w");
- $on_off = ((isset($config['system']['enableserial']) || $g['enableserial_force']) ? 'on' : 'off');
+
+ if (!isset($g['enableserial_force']) &&
+ !isset($config['system']['enableserial']) &&
+ ($g['platform'] == "pfSense" || $g['platform'] == "cdrom" || file_exists("/etc/nano_use_vga.txt")))
+ $on_off = 'off';
+ else
+ $on_off = 'on';
+
if (isset($config['system']['disableconsolemenu'])) {
$console_type = 'Pc';
$serial_type = 'std.' . $serialspeed;
OpenPOWER on IntegriCloud