diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-11-19 02:57:27 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-11-19 02:57:27 +0000 |
commit | cd8ca22fadd883d9367184f72434d62c84cf68b9 (patch) | |
tree | e1ca149f0d3b423fc2934a60d0360900f289fb21 /usr/local/sbin | |
parent | 5003c48ab4760eab2f11f6f68a77e1890def1dfc (diff) | |
download | pfsense-cd8ca22fadd883d9367184f72434d62c84cf68b9.zip pfsense-cd8ca22fadd883d9367184f72434d62c84cf68b9.tar.gz |
Add second argument of more allowing control of when press Return is displayed
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-x | usr/local/sbin/pfSsh.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/local/sbin/pfSsh.php b/usr/local/sbin/pfSsh.php index 54d587a..906be8f 100755 --- a/usr/local/sbin/pfSsh.php +++ b/usr/local/sbin/pfSsh.php @@ -13,14 +13,16 @@ require("config.inc"); echo "."; $g['booting'] = false; -function more($text) { +function more($text, $count=24) { $counter=0; $lines = split("\n", $text); foreach($lines as $line) { - if($counter > 24) { + if($counter > $count) { echo "Press RETURN to continue ..."; $fp = fopen('php://stdin', 'r'); $pressreturn = chop(fgets($fp)); + if($pressreturn == "q" || $pressreturn == "quit") + return; fclose($fp); $counter = 0; } |