diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-04-14 17:31:38 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-04-14 17:31:38 +0000 |
commit | eb64ae425bc393cec452bb66ec43841c03249a04 (patch) | |
tree | ff57fa7fab42ec822ad28dba96b2afe2803a4da2 /usr/local/sbin | |
parent | 2133e06a5f9bd60fd0be6b98545052a1b84b9ce2 (diff) | |
download | pfsense-eb64ae425bc393cec452bb66ec43841c03249a04.zip pfsense-eb64ae425bc393cec452bb66ec43841c03249a04.tar.gz |
* Fix help
* Fix exit/quit
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-x | usr/local/sbin/pfSsh.php | 13 |
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); } - |