mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Add a mechanism by which the serial port can be forced on always regardless of the config setting. (useful for nano+vga setups)
This commit is contained in:
parent
dbfa041c10
commit
407fbf455b
@ -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");
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
system("pfSsh.php playback gitsync " . escapeshellarg($config['system']['gitsync']['branch']) . " --upgrading");
|
||||
}
|
||||
|
||||
if($g['platform'] == "embedded") {
|
||||
if($g['platform'] == "embedded" || $g['enableserial_force']) {
|
||||
$config['system']['enableserial'] = true;
|
||||
write_config();
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@ if ($_POST) {
|
||||
else
|
||||
unset($config['system']['webgui']['noantilockout']);
|
||||
|
||||
if ($_POST['enableserial'] == "yes")
|
||||
if ($_POST['enableserial'] == "yes" || $g['enableserial_force'])
|
||||
$config['system']['enableserial'] = true;
|
||||
else
|
||||
unset($config['system']['enableserial']);
|
||||
@ -525,7 +525,7 @@ function prot_change() {
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="listtopic"><?=gettext("Serial Communications"); ?></td>
|
||||
</tr>
|
||||
<?php if($g['platform'] == "pfSense" || $g['platform'] == "cdrom"): ?>
|
||||
<?php if (!$g['enableserial_force'] && ($g['platform'] == "pfSense" || $g['platform'] == "cdrom" || file_exists("/etc/nano_use_vga.txt"))): ?>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Serial Terminal"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user