summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-08-11 09:57:11 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-08-11 09:57:11 +0000
commit9e4de308ffe3a1de5c72cee002ed0579cb0b76df (patch)
tree86afaf57b924d2a621683b45f54f154eb40a0439
parentbdb5e65dce4e72cd15f74998d7ab0b9c09eece9d (diff)
downloaddrakx-9e4de308ffe3a1de5c72cee002ed0579cb0b76df.tar
drakx-9e4de308ffe3a1de5c72cee002ed0579cb0b76df.tar.gz
drakx-9e4de308ffe3a1de5c72cee002ed0579cb0b76df.tar.bz2
drakx-9e4de308ffe3a1de5c72cee002ed0579cb0b76df.tar.xz
drakx-9e4de308ffe3a1de5c72cee002ed0579cb0b76df.zip
Support for ftp supplementary media
-rw-r--r--perl-install/install_any.pm13
1 files changed, 10 insertions, 3 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index f13ade8bf..f6f94cf45 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -373,13 +373,14 @@ sub setPackages {
my $prev_asked_medium = $asked_medium;
if ($suppl_method && !$o->{isUpgrade}
&& (my $suppl = $o->ask_from_list_('', N("Do you have a supplementary installation media to configure?"),
- [ N_("None"), N_("CD-ROM"), N_("Network (http)") ], 'None')
+ [ N_("None"), N_("CD-ROM"), N_("Network (http)"), N_("Network (ftp)") ], 'None')
) ne 'None')
{
#- translate to method name
$suppl_method = {
'CD-ROM' => 'cdrom',
'Network (http)' => 'http',
+ 'Network (ftp)' => 'ftp',
}->{$suppl};
#- by convention, the media names for suppl. CDs match /^\d+s$/
my $medium_name = $suppl_method eq 'cdrom' ? '1s' : int(keys %{$o->{packages}{mediums}}) + 1;
@@ -420,8 +421,14 @@ sub setPackages {
} else {
my $url = $o->ask_from_entry('', N("URL of the mirror?")) or $suppl_method = '', last SUPPL;
useMedium($medium_name);
- require http;
- my $f = eval { http::getFile("$url/media_info/hdlist.cz") };
+ require "$suppl_method.pm";
+ my $f = eval {
+ if ($suppl_method eq 'http') {
+ http::getFile("$url/media_info/hdlist.cz");
+ } elsif ($suppl_method eq 'ftp') {
+ ftp::getFile("$url/media_info/hdlist.cz");
+ } else { undef }
+ };
if (!defined $f) {
log::l($@) if $@;
$o->ask_warn('', N("Can't find hdlist file on this mirror"));