Project

General

Profile

« Previous | Next » 

Revision 9525f7a6

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
987 987
						fwrite($fd, "{$bcs}\n");
988 988
				}
989 989
			}
990
			if(isset($config['system']['enableserial'])) {
990
			if(isset($config['system']['enableserial']) || $g['enableserial_force']) {
991 991
				fwrite($fd, "-D");
992 992
			}
993 993
			fclose($fd);
......
1012 1012
					$new_boot_config[] = $bcs;
1013 1013

  
1014 1014
			$serialspeed = (is_numeric($config['system']['serialspeed'])) ? $config['system']['serialspeed'] : "9600";
1015
			if(isset($config['system']['enableserial'])) {
1015
			if(isset($config['system']['enableserial']) || $g['enableserial_force']) {
1016 1016
				$new_boot_config[] = 'boot_multicons="YES"';
1017 1017
				$new_boot_config[] = 'boot_serial="YES"';
1018 1018
				$new_boot_config[] = 'comconsole_speed="' . $serialspeed . '"';
......
1031 1031
	$fd = fopen("/etc/ttys", "w");
1032 1032
	foreach($ttys_split as $tty) {
1033 1033
		if(stristr($tty, "ttyd0") or stristr($tty, "ttyu0")) {
1034
			if(isset($config['system']['enableserial'])) {
1034
			if(isset($config['system']['enableserial']) || $g['enableserial_force']) {
1035 1035
				fwrite($fd, "ttyu0	\"/usr/libexec/getty bootupcli\"	cons25	on	secure\n");
1036 1036
			} else {
1037 1037
				fwrite($fd, "ttyu0	\"/usr/libexec/getty bootupcli\"	cons25	off	secure\n");
tmp/post_upgrade_command.php
13 13
			system("pfSsh.php playback gitsync " . escapeshellarg($config['system']['gitsync']['branch']) . " --upgrading");
14 14
	}
15 15

  
16
	if($g['platform'] == "embedded") {
16
	if($g['platform'] == "embedded" || $g['enableserial_force']) {
17 17
		$config['system']['enableserial'] = true;
18 18
		write_config();
19 19
	}
usr/local/www/system_advanced_admin.php
147 147
		else
148 148
			unset($config['system']['webgui']['noantilockout']);
149 149

  
150
		if ($_POST['enableserial'] == "yes")
150
		if ($_POST['enableserial'] == "yes" || $g['enableserial_force'])
151 151
			$config['system']['enableserial'] = true;
152 152
		else
153 153
			unset($config['system']['enableserial']);
......
525 525
							<tr>
526 526
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Serial Communications"); ?></td>
527 527
							</tr>
528
							<?php if($g['platform'] == "pfSense" || $g['platform'] == "cdrom"): ?>
528
							<?php if (!$g['enableserial_force'] && ($g['platform'] == "pfSense" || $g['platform'] == "cdrom" || file_exists("/etc/nano_use_vga.txt"))): ?>
529 529
							<tr>
530 530
								<td width="22%" valign="top" class="vncell"><?=gettext("Serial Terminal"); ?></td>
531 531
								<td width="78%" class="vtable">

Also available in: Unified diff