summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm15
1 files changed, 12 insertions, 3 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index e40c800fe..2ebb6e868 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -31,9 +31,18 @@ sub relGetFile($) {
s/i386/i586/;
$_;
}
-sub getFile($) {
- open getFile, "/tmp/rhimage/" . relGetFile($_[0]) or return;
- \*getFile;
+sub getFile($) {
+ local $^W = 0;
+ if ($::o->{method} && $::o->{method} eq "ftp") {
+ require 'ftp.pm';
+ *install_any::getFile = \&ftp::getFile;
+ } else {
+ *install_any::getFile = sub($) {
+ open getFile, "/tmp/rhimage/" . relGetFile($_[0]) or return;
+ \*getFile;
+ };
+ }
+ goto &getFile;
}
sub versionString {