diff options
Diffstat (limited to 'perl-install/ftp.pm')
-rw-r--r-- | perl-install/ftp.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/perl-install/ftp.pm b/perl-install/ftp.pm index a82729c6e..b1910df13 100644 --- a/perl-install/ftp.pm +++ b/perl-install/ftp.pm @@ -38,8 +38,14 @@ sub new { $password = '-drakx@'; } - my $ftp = Net::FTP->new(network::resolv($host), %options) or die ''; - $ftp->login($login, $password) or die ''; + my $ftp; + while (1) { + $ftp = Net::FTP->new(network::resolv($host), %options) or die; + $ftp && $ftp->login($login, $password) and last; + + log::l("login failed, sleeping before trying again"); + sleep 10; + } $ftp->binary; $ftp->cwd($prefix); |