Project

General

Profile

« Previous | Next » 

Revision 337822a3

Added by Jim Pingle over 8 years ago

Do not output PHP shell starup message unless it is run interactively. Fixes #7045

View differences:

src/usr/local/sbin/pfSsh.php
1 1
#!/usr/local/bin/php-cgi -f
2

  
3 2
<?php
4 3
/*
5 4
 * pfSsh
......
22 21
 */
23 22

  
24 23
require_once("globals.inc");
25
echo "Starting the {$g['product_name']} developer shell";
24
if ($argc < 2) {
25
	echo "Starting the {$g['product_name']} developer shell";
26
}
26 27
require_once("functions.inc");
27
echo ".";
28
if ($argc < 2) {
29
	echo ".";
30
}
28 31
require_once("config.inc");
29
echo ".";
32
if ($argc < 2) {
33
	echo ".";
34
}
30 35
require_once("util.inc");
31
echo ".";
36
if ($argc < 2) {
37
	echo ".";
38
}
32 39

  
33 40
$shell_cmds = array("alias", "alloc", "bg", "bind", "bindkey", "break",
34 41
	 "breaksw", "builtins", "case", "cd", "chdir", "command", "complete", "continue", "default",
......
167 174

  
168 175
$fp = fopen('php://stdin', 'r');
169 176

  
170
echo ".\n\n";
177
if ($argc < 2) {
178
	echo ".\n\n";
179
}
171 180

  
172 181
$pkg_interface='console';
173 182

  

Also available in: Unified diff