summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-04-14 17:31:38 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-04-14 17:31:38 +0000
commiteb64ae425bc393cec452bb66ec43841c03249a04 (patch)
treeff57fa7fab42ec822ad28dba96b2afe2803a4da2 /usr/local/sbin
parent2133e06a5f9bd60fd0be6b98545052a1b84b9ce2 (diff)
downloadpfsense-eb64ae425bc393cec452bb66ec43841c03249a04.zip
pfsense-eb64ae425bc393cec452bb66ec43841c03249a04.tar.gz
* Fix help
* Fix exit/quit
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-xusr/local/sbin/pfSsh.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/usr/local/sbin/pfSsh.php b/usr/local/sbin/pfSsh.php
index 5b478c1..0363360 100755
--- a/usr/local/sbin/pfSsh.php
+++ b/usr/local/sbin/pfSsh.php
@@ -149,6 +149,8 @@ EOF;
}
+$fp = fopen('php://stdin', 'r');
+
echo ".\n\n";
$pkg_interface='console';
@@ -191,6 +193,14 @@ while($shell_active == true) {
continue;
}
}
+ if($first_command == "exit" or $first_command == "quit") {
+ die;
+ }
+ if($first_command == "help" or $first_command == "?") {
+ show_help();
+ $playbackbuffer = "";
+ continue;
+ }
if($first_command == "exec" or $first_command == "exec;") {
playback_text($playbackbuffer);
$playbackbuffer = "";
@@ -214,7 +224,7 @@ while($shell_active == true) {
safe_mkdir("/etc/phpshellsessions");
if($recording)
conf_mount_ro();
- echo "==> Sessions available for playback are:\n\n";
+ echo "==> Sessions available for playback are:\n";
system("cd /etc/phpshellsessions && ls /etc/phpshellsessions");
echo "==> end of list.\n";
$command = "";
@@ -292,4 +302,3 @@ function playback_file($playback_file) {
playback_text($playback_file_contents);
}
-
OpenPOWER on IntegriCloud