summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2016-12-28 13:45:04 -0500
committerjim-p <jimp@pfsense.org>2017-02-10 12:42:17 -0500
commit7a7559219f4fae2419285348dabd86788e5eefea (patch)
tree8258359e5a6b8efd0e27490b3f63bcce31ceb5f2
parentbdc16e2692a4cf6a1aa281ca61bc063006d949dc (diff)
downloadpfsense-7a7559219f4fae2419285348dabd86788e5eefea.zip
pfsense-7a7559219f4fae2419285348dabd86788e5eefea.tar.gz
Do not output PHP shell starup message unless it is run interactively. Fixes #7045
-rwxr-xr-xsrc/usr/local/sbin/pfSsh.php21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/usr/local/sbin/pfSsh.php b/src/usr/local/sbin/pfSsh.php
index 56f6406..ba160ab 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
@@ -54,13 +53,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",
@@ -199,7 +206,9 @@ EOF;
$fp = fopen('php://stdin', 'r');
-echo ".\n\n";
+if ($argc < 2) {
+ echo ".\n\n";
+}
$pkg_interface='console';
OpenPOWER on IntegriCloud