diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-07-01 14:11:53 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-07-01 14:11:53 -0300 |
commit | c5f9fb72655ce9b87ba7a8dad5cadeb1acd20150 (patch) | |
tree | df31a2bcdf4af0794b5ecd1809525d7fb617f93e | |
parent | e6e3e0ee0ed906c19144f7dbadcc62dc31a8ec67 (diff) | |
download | pfsense-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.inc | 9 |
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; |