summaryrefslogtreecommitdiffstats
path: root/etc/inc/pfsense-utils.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2014-02-14 09:56:37 -0500
committerjim-p <jimp@pfsense.org>2014-02-14 09:58:00 -0500
commit9525f7a6c8175bf6de9f0d70254f17d63f3af93a (patch)
treedbc2b8a93700128400c12d3e3a5cfa8eb30affc0 /etc/inc/pfsense-utils.inc
parentfe640345b6e7cdf83ce0512088b630aeff5d9589 (diff)
downloadpfsense-9525f7a6c8175bf6de9f0d70254f17d63f3af93a.zip
pfsense-9525f7a6c8175bf6de9f0d70254f17d63f3af93a.tar.gz
Add a mechanism by which the serial port can be forced on always regardless of the config setting. (useful for nano+vga setups)
Diffstat (limited to 'etc/inc/pfsense-utils.inc')
-rw-r--r--etc/inc/pfsense-utils.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index e7aaa2b..0737946 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -987,7 +987,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);
@@ -1012,7 +1012,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 . '"';
@@ -1031,7 +1031,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");
OpenPOWER on IntegriCloud