Project

General

Profile

« Previous | Next » 

Revision 407fbf45

Added by Jim Pingle over 11 years ago

Add a mechanism by which the serial port can be forced on always regardless of the config setting. (useful for nano+vga setups)

View differences:

etc/inc/pfsense-utils.inc
991 991
						fwrite($fd, "{$bcs}\n");
992 992
				}
993 993
			}
994
			if(isset($config['system']['enableserial'])) {
994
			if(isset($config['system']['enableserial']) || $g['enableserial_force']) {
995 995
				fwrite($fd, "-D");
996 996
			}
997 997
			fclose($fd);
......
1016 1016
					$new_boot_config[] = $bcs;
1017 1017

  
1018 1018
			$serialspeed = (is_numeric($config['system']['serialspeed'])) ? $config['system']['serialspeed'] : "9600";
1019
			if(isset($config['system']['enableserial'])) {
1019
			if(isset($config['system']['enableserial']) || $g['enableserial_force']) {
1020 1020
				$new_boot_config[] = 'boot_multicons="YES"';
1021 1021
				$new_boot_config[] = 'boot_serial="YES"';
1022 1022
				$new_boot_config[] = 'comconsole_speed="' . $serialspeed . '"';
......
1035 1035
	$fd = fopen("/etc/ttys", "w");
1036 1036
	foreach($ttys_split as $tty) {
1037 1037
		if(stristr($tty, "ttyd0") or stristr($tty, "ttyu0")) {
1038
			if(isset($config['system']['enableserial'])) {
1038
			if(isset($config['system']['enableserial']) || $g['enableserial_force']) {
1039 1039
				fwrite($fd, "ttyu0	\"/usr/libexec/getty bootupcli\"	cons25	on	secure\n");
1040 1040
			} else {
1041 1041
				fwrite($fd, "ttyu0	\"/usr/libexec/getty bootupcli\"	cons25	off	secure\n");

Also available in: Unified diff