summaryrefslogtreecommitdiffstats
path: root/perl-install/ftp.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-04-17 11:34:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-04-17 11:34:32 +0000
commit4781e491c32fdfe0dbe3cf97a8aca90040a9406b (patch)
treeca4f166763cc8be7bc01e943dcbf5a058758060d /perl-install/ftp.pm
parent5458ef92ec80fab427e4d69b5cdd22bb76b261d8 (diff)
downloaddrakx-4781e491c32fdfe0dbe3cf97a8aca90040a9406b.tar
drakx-4781e491c32fdfe0dbe3cf97a8aca90040a9406b.tar.gz
drakx-4781e491c32fdfe0dbe3cf97a8aca90040a9406b.tar.bz2
drakx-4781e491c32fdfe0dbe3cf97a8aca90040a9406b.tar.xz
drakx-4781e491c32fdfe0dbe3cf97a8aca90040a9406b.zip
new perl_checker compliance
Diffstat (limited to 'perl-install/ftp.pm')
-rw-r--r--perl-install/ftp.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/ftp.pm b/perl-install/ftp.pm
index 05e892c62..c971898a1 100644
--- a/perl-install/ftp.pm
+++ b/perl-install/ftp.pm
@@ -17,22 +17,22 @@ sub fromEnv() {
}
sub new {
- my ($host, $prefix, $login, $password) = @_;
+ my ($host, $prefix, $o_login, $o_password) = @_;
my @l = do { if ($hosts{"$host$prefix"}) {
@{$hosts{"$host$prefix"}};
} else {
my %options = (Passive => 1, Timeout => 60, Port => 21);
$options{Firewall} = $ENV{PROXY} if $ENV{PROXY};
$options{Port} = $ENV{PROXYPORT} if $ENV{PROXYPORT};
- unless ($login) {
- $login = 'anonymous';
- $password = '-drakx@';
+ unless ($o_login) {
+ $o_login = 'anonymous';
+ $o_password = '-drakx@';
}
my $ftp;
foreach (1..10) {
$ftp = Net::FTP->new(network::resolv($host), %options) or die;
- $ftp && $ftp->login($login, $password) and last;
+ $ftp && $ftp->login($o_login, $o_password) and last;
log::l("ftp login failed, sleeping before trying again");
sleep 5 * $_;