Subject: | Option to enable passive FTP; patch included |
Hi,
I think it would be nice if this script had an option to enable passive
FTP. I have attached a patch to do this.
Regards,
--
Steven Chamberlain
steven@pyro.eu.org
Subject: | cpan-upload-passive-ftp-option.diff |
diff -Nru cpan-upload-2.2.orig/cpan-upload cpan-upload-2.2/cpan-upload
--- cpan-upload-2.2.orig/cpan-upload 2002-07-02 22:44:10.000000000 +0100
+++ cpan-upload-2.2/cpan-upload 2008-08-23 10:19:11.000000000 +0100
@@ -83,6 +83,7 @@
$config->define('ftp_proxy');
$config->define('http_proxy');
$config->define('non_interactive', { ALIAS => 'ni', ARGCOUNT => 0 });
+ $config->define('passive', { ARGCOUNT => 0 });
#-------------------------------------------------------------------
# Read the user's config file, if they have one,
@@ -177,6 +178,12 @@
}
}
+ if ($config->passive)
+ {
+ _debug(" enabling passive mode FTP\n");
+ push(@new_args, 'Passive' => 1);
+ }
+
#-------------------------------------------------------------------
# ... and then we actually make the connection and log in
#-------------------------------------------------------------------
@@ -471,6 +478,10 @@
cpan-upload should not prompt for any missing information (eg password),
it should just warn or die, as appropriate.
+=item -passive
+
+Enables passive mode for FTP connections.
+
=item -help
Displays a short help message with the OPTIONS section