summaryrefslogtreecommitdiffstats
path: root/perl-install/proxy.pm
diff options
context:
space:
mode:
authorDavid Odin <odin@mandriva.org>2001-06-15 13:21:03 +0000
committerDavid Odin <odin@mandriva.org>2001-06-15 13:21:03 +0000
commit5811f7a855d6827e43172313df3c29c4f9f2f820 (patch)
treea2ae4743692f2254a24970bd1008dc000c1f2eae /perl-install/proxy.pm
parent06ad5a0db66b3612302fd6b070247ec45ee9d2fa (diff)
downloaddrakx-5811f7a855d6827e43172313df3c29c4f9f2f820.tar
drakx-5811f7a855d6827e43172313df3c29c4f9f2f820.tar.gz
drakx-5811f7a855d6827e43172313df3c29c4f9f2f820.tar.bz2
drakx-5811f7a855d6827e43172313df3c29c4f9f2f820.tar.xz
drakx-5811f7a855d6827e43172313df3c29c4f9f2f820.zip
fix some tab madness
Diffstat (limited to 'perl-install/proxy.pm')
-rw-r--r--perl-install/proxy.pm98
1 files changed, 49 insertions, 49 deletions
diff --git a/perl-install/proxy.pm b/perl-install/proxy.pm
index 9d423fd1e..b2cde4586 100644
--- a/perl-install/proxy.pm
+++ b/perl-install/proxy.pm
@@ -19,8 +19,8 @@ sub main {
/ftp_proxy = (ftp:.*):(\d+)/ and ($proxy_cfg->{ftp_url}, $proxy_cfg->{ftp_port}) = ($1, $2);
/http_user = (.*)/ and ($proxy_cfg->{login}) = $1;
if (/http_passwd = (.*)/) {
- ($proxy_cfg->{passwd}) = $1;
- ($proxy_cfg->{passwd2}) = $1;
+ ($proxy_cfg->{passwd}) = $1;
+ ($proxy_cfg->{passwd2}) = $1;
}
}
begin:
@@ -28,7 +28,7 @@ sub main {
$::Wizard_no_previous = 1;
$in->ask_okcancel(_("Proxy configuration"),
_("Welcome to the proxy configuration utility.\n\nHere, you'll be able to set up your http and ftp proxies\nwith or without login and password\n"
- ), 1);
+ ), 1);
# http proxy
step_http_proxy:
@@ -36,68 +36,68 @@ sub main {
$proxy_cfg->{http_url} ||= "http://www.proxy.com/";
$in->ask_from_entries_refH(_("Proxy configuration"),
_("Please fill in the http proxy informations\nLeave it blank if you don't want an http proxy"),
- [ { label => _("URL"), val => \$proxy_cfg->{http_url} },
- { label => _("port"), val => \$proxy_cfg->{http_port} }
- ],
- complete => sub {
- if($proxy_cfg->{http_url} && $proxy_cfg->{http_url} !~ /^http:/) {
- $in->ask_warn('', _("Url should begin with 'http:'"));
- return (1,0);
- }
- if ($proxy_cfg->{http_port} && $proxy_cfg->{http_port} !~ /^\d+$/) {
- $in->ask_warn('', _("The port part should be numeric"));
- return (1,1);
- }
- 0;
- }
- ) or goto begin;
+ [ { label => _("URL"), val => \$proxy_cfg->{http_url} },
+ { label => _("port"), val => \$proxy_cfg->{http_port} }
+ ],
+ complete => sub {
+ if ($proxy_cfg->{http_url} && $proxy_cfg->{http_url} !~ /^http:/) {
+ $in->ask_warn('', _("Url should begin with 'http:'"));
+ return (1,0);
+ }
+ if ($proxy_cfg->{http_port} && $proxy_cfg->{http_port} !~ /^\d+$/) {
+ $in->ask_warn('', _("The port part should be numeric"));
+ return (1,1);
+ }
+ 0;
+ }
+ ) or goto begin;
# ftp proxy
step_ftp_proxy:
$proxy_cfg->{ftp_url} ||= "ftp://ftp.proxy.com/";
$in->ask_from_entries_refH(_("Proxy configuration"),
_("Please fill in the ftp proxy informations\nLeave it blank if you don't want an ftp proxy"),
- [ { label => _("URL"), val => \$proxy_cfg->{ftp_url} },
- { label => _("port"), val => \$proxy_cfg->{ftp_port} }
- ],
- complete => sub {
- if ($proxy_cfg->{ftp_url} && $proxy_cfg->{ftp_url} !~ /^ftp:/) {
- $in->ask_warn('', _("Url should begin with 'ftp:'"));
- return (1,0);
- }
- if ($proxy_cfg->{ftp_port} && $proxy_cfg->{ftp_port} !~ /^\d+$/) {
- $in->ask_warn('', _("The port part should be numeric"));
- return (1,1);
- }
- 0;
- }
- ) or goto step_http_proxy;
+ [ { label => _("URL"), val => \$proxy_cfg->{ftp_url} },
+ { label => _("port"), val => \$proxy_cfg->{ftp_port} }
+ ],
+ complete => sub {
+ if ($proxy_cfg->{ftp_url} && $proxy_cfg->{ftp_url} !~ /^ftp:/) {
+ $in->ask_warn('', _("Url should begin with 'ftp:'"));
+ return (1,0);
+ }
+ if ($proxy_cfg->{ftp_port} && $proxy_cfg->{ftp_port} !~ /^\d+$/) {
+ $in->ask_warn('', _("The port part should be numeric"));
+ return (1,1);
+ }
+ 0;
+ }
+ ) or goto step_http_proxy;
# proxy login/passwd
step_login:
$in->ask_from_entries_refH(_("Proxy configuration"),
_("Please enter proxy login and password, if any.\nLeave it blank if you don't want login/passwd"),
- [ { label => _("login"), val => \$proxy_cfg->{login} },
- { label => _("password"), val => \$proxy_cfg->{passwd}, hidden => 1 },
- { label => _("re-type password"), val => \$proxy_cfg->{passwd2}, hidden => 1 }
- ],
- complete => sub {
- if ($proxy_cfg->{passwd} ne $proxy_cfg->{passwd2}) {
- $in->ask_warn('', _("The passwords don't match. Try again!"));
- return(1,1);
- }
- 0;
- }
- ) or goto step_ftp_proxy;
+ [ { label => _("login"), val => \$proxy_cfg->{login} },
+ { label => _("password"), val => \$proxy_cfg->{passwd}, hidden => 1 },
+ { label => _("re-type password"), val => \$proxy_cfg->{passwd2}, hidden => 1 }
+ ],
+ complete => sub {
+ if ($proxy_cfg->{passwd} ne $proxy_cfg->{passwd2}) {
+ $in->ask_warn('', _("The passwords don't match. Try again!"));
+ return(1,1);
+ }
+ 0;
+ }
+ ) or goto step_ftp_proxy;
# save config
substInFile {
- s/^(http|ftp)_proxy.*\n//;
- eof and $_ .= "http_proxy = $proxy_cfg->{http_url}:$proxy_cfg->{http_port}
+ s/^(http|ftp)_proxy.*\n//;
+ eof and $_ .= "http_proxy = $proxy_cfg->{http_url}:$proxy_cfg->{http_port}
ftp_proxy = $proxy_cfg->{ftp_url}:$proxy_cfg->{ftp_port}\n";
} $config_file;
$proxy_cfg->{login} and substInFile {
- s/^http_(user|passwd).*\n//;
- eof and $_ .= "http_user = $proxy_cfg->{login}
+ s/^http_(user|passwd).*\n//;
+ eof and $_ .= "http_user = $proxy_cfg->{login}
http_passwd = $proxy_cfg->{passwd}\n" } $config_file;
log::l("[drakproxy] Installation complete, exiting\n");
}