summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-02-18 17:36:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-02-18 17:36:30 +0000
commit7f6960932d3ef33f596ff552e78018023c932d7e (patch)
tree21721f83bbc58cb3cabbad26c7bae0559a13571e /perl-install
parent3ce35b6a36bd75410c11af5e804a08f7d5650aa8 (diff)
downloaddrakx-backup-do-not-use-7f6960932d3ef33f596ff552e78018023c932d7e.tar
drakx-backup-do-not-use-7f6960932d3ef33f596ff552e78018023c932d7e.tar.gz
drakx-backup-do-not-use-7f6960932d3ef33f596ff552e78018023c932d7e.tar.bz2
drakx-backup-do-not-use-7f6960932d3ef33f596ff552e78018023c932d7e.tar.xz
drakx-backup-do-not-use-7f6960932d3ef33f596ff552e78018023c932d7e.zip
- add HTTP support in media_browser
- HTTP support is non save only
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_any.pm20
1 files changed, 18 insertions, 2 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 2243dbdcc..ad2ff3b4e 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -1503,7 +1503,7 @@ sub media_browser {
hd => N("Hard Disk"),
cdrom => N("CDROM"),
);
- my @network_protocols = (N_("HTTP"), N_("FTP"), N_("NFS"));
+ my @network_protocols = (if_(!$save, N_("HTTP")), N_("FTP"), N_("NFS"));
my $to_text = sub {
my ($hd) = @_;
@@ -1535,7 +1535,23 @@ sub media_browser {
if (member($dev, @network_protocols)) {
install_interactive::upNetwork($::o);
- $in->ask_warn('', 'todo');
+ if ($dev eq 'HTTP') {
+ require http;
+ $media_browser{network} ||= 'http://';
+ } else {
+ $in->ask_warn('', 'todo');
+ goto ask_media;
+ }
+ while (1) {
+ $in->ask_from('', 'URL', [
+ { val => \$media_browser{network} }
+ ]) or last;
+
+ if ($dev eq 'HTTP') {
+ my $fh = http::getFile($media_browser{network});
+ $fh and return '', $fh;
+ }
+ }
} else {
if (!$dev->{fs_type} || $dev->{fs_type} eq 'auto' || $dev->{fs_type} =~ /:/) {
if (my $p = fs::type::type_subpart_from_magic($dev)) {