From 58300df6a07a463cae44f37672e0ae8b30b2c15e Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 14 Jan 2004 15:06:18 +0000 Subject: (miscellaneous_choose) restore it for drakproxy (we'd better split out network interface and proxy configuration at install time) --- perl-install/network/network.pm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'perl-install/network/network.pm') 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)); -- cgit v1.2.1