mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Add second argument of more allowing control of when press Return is displayed
This commit is contained in:
parent
5003c48ab4
commit
cd8ca22fad
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user