diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/ftp.pm | 11 | ||||
-rw-r--r-- | perl-install/install_any.pm | 6 | ||||
-rw-r--r-- | perl-install/pkgs.pm | 2 |
3 files changed, 19 insertions, 0 deletions
diff --git a/perl-install/ftp.pm b/perl-install/ftp.pm index c1b93fec4..350619c23 100644 --- a/perl-install/ftp.pm +++ b/perl-install/ftp.pm @@ -56,3 +56,14 @@ sub getFile($) { $$retr->close if $$retr; $$retr = $ftp->retr(install_any::relGetFile($f)); } + +sub rewindGetFile() { + #- close any existing connection. + foreach (values %hosts) { + my ($ftp) = @{$_ || []}; + $ftp->close() if $ftp; + } + + #- make sure to reconnect to server. + %hosts = (); +} diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 7ccb2e73e..a38316bbd 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -55,6 +55,12 @@ sub getFile($) { } goto &getFile; } +sub rewindGetFile() { + if ($::o->{method} && $::o->{method} eq "ftp") { + require ftp; + ftp::rewindGetFile(); #- make sure to reopen connection. + } +} sub kernelVersion { local $_ = readlink("$::o->{prefix}/boot/vmlinuz") || $::testing && "vmlinuz-2.2.testversion" or die "I couldn't find the kernel package!"; diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 8cae2a75f..e288471c5 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -635,6 +635,8 @@ sub install($$$) { c::rpmtransFree($trans); c::rpmdbClose($db); log::l("rpm database closed"); + + install_any::rewindGetFile(); #- make sure to reopen the connection, usefull for ftp. } sub remove($$) { |