summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-01-14 15:06:18 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-01-14 15:06:18 +0000
commit58300df6a07a463cae44f37672e0ae8b30b2c15e (patch)
tree6293c2dd9903740fc78f668c8239cdcbe30036bf /perl-install/network
parenta5aec40740653860c4a0ceed68949d103d2a8707 (diff)
downloaddrakx-58300df6a07a463cae44f37672e0ae8b30b2c15e.tar
drakx-58300df6a07a463cae44f37672e0ae8b30b2c15e.tar.gz
drakx-58300df6a07a463cae44f37672e0ae8b30b2c15e.tar.bz2
drakx-58300df6a07a463cae44f37672e0ae8b30b2c15e.tar.xz
drakx-58300df6a07a463cae44f37672e0ae8b30b2c15e.zip
(miscellaneous_choose) restore it for drakproxy (we'd better split out
network interface and proxy configuration at install time)
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/network.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index abd0cf486..dbe536810 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -313,6 +313,23 @@ sub gateway {
join(".", @masked);
}
+sub miscellaneous_choose {
+ my ($in, $u) = @_;
+
+ $in->ask_from('',
+ N("Proxies configuration"),
+ [ { label => N("HTTP proxy"), val => \$u->{http_proxy} },
+ { label => N("FTP proxy"), val => \$u->{ftp_proxy} },
+ ],
+ complete => sub {
+ $u->{http_proxy} =~ m,^($|http://), or $in->ask_warn('', N("Proxy should be http://...")), return 1,0;
+ $u->{ftp_proxy} =~ m,^($|ftp://|http://), or $in->ask_warn('', N("URL should begin with 'ftp:' or 'http:'")), return 1,1;
+ 0;
+ }
+ ) or return;
+ 1;
+}
+
sub proxy_configure {
my ($u) = @_;
setExportedVarsInSh("$::prefix/etc/profile.d/proxy.sh", $u, qw(http_proxy ftp_proxy));