diff options
author | Francois Pons <fpons@mandriva.com> | 2000-01-05 10:48:46 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-01-05 10:48:46 +0000 |
commit | a130ec1291fed0faabfc8051f990f6765f1eabe1 (patch) | |
tree | 6003da55772ec84c01633b43d0e56075da4697b1 /perl-install | |
parent | 7375c014ce40d54d6199645fcf030e992448b930 (diff) | |
download | drakx-backup-do-not-use-a130ec1291fed0faabfc8051f990f6765f1eabe1.tar drakx-backup-do-not-use-a130ec1291fed0faabfc8051f990f6765f1eabe1.tar.gz drakx-backup-do-not-use-a130ec1291fed0faabfc8051f990f6765f1eabe1.tar.bz2 drakx-backup-do-not-use-a130ec1291fed0faabfc8051f990f6765f1eabe1.tar.xz drakx-backup-do-not-use-a130ec1291fed0faabfc8051f990f6765f1eabe1.zip |
*** empty log message ***
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($$) { |