summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-11-19 02:57:27 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-11-19 02:57:27 +0000
commitcd8ca22fadd883d9367184f72434d62c84cf68b9 (patch)
treee1ca149f0d3b423fc2934a60d0360900f289fb21 /usr
parent5003c48ab4760eab2f11f6f68a77e1890def1dfc (diff)
downloadpfsense-cd8ca22fadd883d9367184f72434d62c84cf68b9.zip
pfsense-cd8ca22fadd883d9367184f72434d62c84cf68b9.tar.gz
Add second argument of more allowing control of when press Return is displayed
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/sbin/pfSsh.php6
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;
}
OpenPOWER on IntegriCloud