diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-09-08 20:45:53 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-09-08 20:45:53 +0000 |
commit | 0efc887f05de0158d629a8abb9c16c6a537db739 (patch) | |
tree | 9492dfbcdb65328674f7a6ea50c67ed96dd09cee /etc/inc/pfsense-utils.inc | |
parent | 819ccd08b0d45766c62f6fd946a8edd3421e216d (diff) | |
download | pfsense-0efc887f05de0158d629a8abb9c16c6a537db739.zip pfsense-0efc887f05de0158d629a8abb9c16c6a537db739.tar.gz |
Actually enable the serial port correctly and present the menu when needed.
Diffstat (limited to 'etc/inc/pfsense-utils.inc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 15 |
1 files changed, 15 insertions, 0 deletions
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 { |