From cd8ca22fadd883d9367184f72434d62c84cf68b9 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 19 Nov 2007 02:57:27 +0000 Subject: [PATCH] Add second argument of more allowing control of when press Return is displayed --- usr/local/sbin/pfSsh.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr/local/sbin/pfSsh.php b/usr/local/sbin/pfSsh.php index 54d587a066..906be8f6e1 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; }