From 407fbf455bbd10144713343dc6e7950eac386fc2 Mon Sep 17 00:00:00 2001 From: jim-p Date: Fri, 14 Feb 2014 09:56:37 -0500 Subject: Add a mechanism by which the serial port can be forced on always regardless of the config setting. (useful for nano+vga setups) --- etc/inc/pfsense-utils.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'etc/inc/pfsense-utils.inc') diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 0e372f4..52c4519 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -991,7 +991,7 @@ function setup_serial_port($when="save", $path="") { fwrite($fd, "{$bcs}\n"); } } - if(isset($config['system']['enableserial'])) { + if(isset($config['system']['enableserial']) || $g['enableserial_force']) { fwrite($fd, "-D"); } fclose($fd); @@ -1016,7 +1016,7 @@ function setup_serial_port($when="save", $path="") { $new_boot_config[] = $bcs; $serialspeed = (is_numeric($config['system']['serialspeed'])) ? $config['system']['serialspeed'] : "9600"; - if(isset($config['system']['enableserial'])) { + if(isset($config['system']['enableserial']) || $g['enableserial_force']) { $new_boot_config[] = 'boot_multicons="YES"'; $new_boot_config[] = 'boot_serial="YES"'; $new_boot_config[] = 'comconsole_speed="' . $serialspeed . '"'; @@ -1035,7 +1035,7 @@ function setup_serial_port($when="save", $path="") { $fd = fopen("/etc/ttys", "w"); foreach($ttys_split as $tty) { if(stristr($tty, "ttyd0") or stristr($tty, "ttyu0")) { - if(isset($config['system']['enableserial'])) { + if(isset($config['system']['enableserial']) || $g['enableserial_force']) { fwrite($fd, "ttyu0 \"/usr/libexec/getty bootupcli\" cons25 on secure\n"); } else { fwrite($fd, "ttyu0 \"/usr/libexec/getty bootupcli\" cons25 off secure\n"); -- cgit v1.1