diff options
author | jim-p <jimp@pfsense.org> | 2016-12-28 13:45:04 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2016-12-28 13:47:23 -0500 |
commit | 337822a39bfd89c011cfda4092a6e5e409a7dbcf (patch) | |
tree | f3fe84f9f4328e7730d09a40d65c83b1d903349a /src/usr/local/sbin/pfSsh.php | |
parent | 8128464bb6e4991b200057073db7aeef15bed563 (diff) | |
download | pfsense-337822a39bfd89c011cfda4092a6e5e409a7dbcf.zip pfsense-337822a39bfd89c011cfda4092a6e5e409a7dbcf.tar.gz |
Do not output PHP shell starup message unless it is run interactively. Fixes #7045
Diffstat (limited to 'src/usr/local/sbin/pfSsh.php')
-rwxr-xr-x | src/usr/local/sbin/pfSsh.php | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/usr/local/sbin/pfSsh.php b/src/usr/local/sbin/pfSsh.php index c91ab7e..2e07b9a 100755 --- a/src/usr/local/sbin/pfSsh.php +++ b/src/usr/local/sbin/pfSsh.php @@ -1,5 +1,4 @@ #!/usr/local/bin/php-cgi -f - <?php /* * pfSsh @@ -22,13 +21,21 @@ */ require_once("globals.inc"); -echo "Starting the {$g['product_name']} developer shell"; +if ($argc < 2) { + echo "Starting the {$g['product_name']} developer shell"; +} require_once("functions.inc"); -echo "."; +if ($argc < 2) { + echo "."; +} require_once("config.inc"); -echo "."; +if ($argc < 2) { + echo "."; +} require_once("util.inc"); -echo "."; +if ($argc < 2) { + echo "."; +} $shell_cmds = array("alias", "alloc", "bg", "bind", "bindkey", "break", "breaksw", "builtins", "case", "cd", "chdir", "command", "complete", "continue", "default", @@ -167,7 +174,9 @@ EOF; $fp = fopen('php://stdin', 'r'); -echo ".\n\n"; +if ($argc < 2) { + echo ".\n\n"; +} $pkg_interface='console'; |