diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-11-23 07:57:22 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-11-23 07:57:22 +0000 |
commit | 96ebb0a6b6b62d93fd7dcced55b27ecd639833c6 (patch) | |
tree | b428dfe7cdb57a089a3636f7ceb15752d6b8649d | |
parent | 6475461880d3bcae0868dff42a39ec597a8e8041 (diff) | |
download | pfsense-96ebb0a6b6b62d93fd7dcced55b27ecd639833c6.zip pfsense-96ebb0a6b6b62d93fd7dcced55b27ecd639833c6.tar.gz |
Allow arguments to be passed to cvssync so you can do:
pfSsh.php playback cvssync RELENG_1
-rw-r--r-- | etc/phpshellsessions/cvssync | 18 | ||||
-rwxr-xr-x | usr/local/sbin/pfSsh.php | 2 |
2 files changed, 12 insertions, 8 deletions
diff --git a/etc/phpshellsessions/cvssync b/etc/phpshellsessions/cvssync index 2b535ef..3e70d27 100644 --- a/etc/phpshellsessions/cvssync +++ b/etc/phpshellsessions/cvssync @@ -37,12 +37,18 @@ if(!file_exists("/usr/bin/cvs")) { system("chmod a+rx /usr/bin/cvs"); } -echo "\nPlease select which branch you would like:\n\n"; -echo "RELENG_1_2 - 1.2 Release branch\n"; -echo "RELENG_1 - 1.3 branch\n"; -echo "HEAD - Main development branch\n"; - -$branch = readline("\n> "); +global $argv; + +if(!$argv[3]) { + echo "\nPlease select which branch you would like:\n\n"; + echo "RELENG_1_2 - 1.2 Release branch\n"; + echo "RELENG_1 - 1.3 branch\n"; + echo "HEAD - Main development branch\n"; + + $branch = readline("\n> "); +} else { + $branch = $argv[3]; +} create_supfile($branch); diff --git a/usr/local/sbin/pfSsh.php b/usr/local/sbin/pfSsh.php index 2aa9a23..e900b10 100755 --- a/usr/local/sbin/pfSsh.php +++ b/usr/local/sbin/pfSsh.php @@ -167,8 +167,6 @@ $recording = false; $playback_file_split = array(); $playbackbuffer = ""; -echo "Passing arguments to pfSense shell: {$argv[1]} {$argv[2]}\n"; - if($argv[1]=="playback" or $argv[1]=="run") { playback_file($argv[2]); exit; |