summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-09-08 20:45:53 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-09-08 20:45:53 +0000
commit0efc887f05de0158d629a8abb9c16c6a537db739 (patch)
tree9492dfbcdb65328674f7a6ea50c67ed96dd09cee
parent819ccd08b0d45766c62f6fd946a8edd3421e216d (diff)
downloadpfsense-0efc887f05de0158d629a8abb9c16c6a537db739.zip
pfsense-0efc887f05de0158d629a8abb9c16c6a537db739.tar.gz
Actually enable the serial port correctly and present the menu when needed.
-rw-r--r--etc/gettytab4
-rw-r--r--etc/inc/pfsense-utils.inc15
2 files changed, 19 insertions, 0 deletions
diff --git a/etc/gettytab b/etc/gettytab
index 82d4d01..95b2a7e 100644
--- a/etc/gettytab
+++ b/etc/gettytab
@@ -164,6 +164,10 @@ X|Xwindow|X window system:\
P|Pc|Pc console:\
:ht:np:sp#115200:al=root:
+bootupcli:\
+ tc=std.9600:\
+ :ht:np:sp#115200:al=root:
+
#
# Wierdo special case for fast crt's with hardcopy devices
#
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 6e31b1d..3418e75 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1886,6 +1886,21 @@ function setup_serial_port() {
fclose($fd);
}
}
+ $ttys = file_get_contents("/etc/ttys");
+ $ttys_split = split("\n", $ttys);
+ $fd = fopen("/etc/ttys", "w");
+ foreach($ttys_split as $tty) {
+ if(stristr("ttyd0")) {
+ if(isset($config['system']['disableconsolemenu'])) {
+ fwrite($fd, "ttyd0 \"/usr/libexec/getty bootupcli\" dialup off secure\n");
+ } else {
+ fwrite($fd, "ttyd0 \"/usr/libexec/getty bootupcli\" dialup on secure\n");
+ }
+ } else {
+ fwrite($fd, $tty . "\n");
+ }
+ }
+ fclose($fd);
if(isset($config['system']['disableconsolemenu'])) {
auto_login(false);
} else {
OpenPOWER on IntegriCloud