summaryrefslogtreecommitdiffstats
path: root/perl-install/proxy.pm
blob: 8779d48c88f64564388b4d2b5b5c41e635dcd130 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package proxy;

use diagnostics;
use strict;
use run_program;
use common qw(:common :system :file);
use log;
use c;

sub main {
    my ($prefix, $in, $install) = @_;
  begin:
    $::isWizard = 1;
    $::Wizard_no_previous = 1;
    $in->ask_okcancel(_("Proxy configuration"), _("blabla proxy"), 1) or quit_global($in, 0);
   
    # http proxy
    my $http_proxy = {};
    $http_proxy->{url} = "http://bla.foo.fr/";
    $in->ask_from_entries_refH(_("Proxy configuration"),
                               _("Please fill in the http proxy informations"),
         [
           { label => _("URL"), val => \$http_proxy->{url} },
           { label => _("port"), val => \$http_proxy->{port} }
	 ]
    );
    undef $::Wizard_no_previous;
    # ftp proxy
    my $ftp_proxy = {};
    $ftp_proxy->{url} = "http://bla.foo.fr/";
    $in->ask_from_entries_refH(_("Proxy configuration"),
                               _("Please fill in the ftp proxy informations"),
         [
           { label => _("URL"), val => \$ftp_proxy->{url} },
           { label => _("port"), val => \$ftp_proxy->{port} }
	 ]
    );
    # proxy login/passwd
    my $proxy_login = {};
    $in->ask_from_entries_refH(_("Proxy configuration"),
                               _("Please enter proxy login and password, if any"),
         [
	   { label => _("login"), val => \$proxy_login->{login} },
	   { label => _("password"), val => \$proxy_login->{passwd} }
	 ]
    );
    
    print "http: $http_proxy->{url}:$http_proxy->{port}\n";
    print "ftp: $ftp_proxy->{url}:$ftp_proxy->{port}\n";
    print "login: $proxy_login->{login}, $proxy_login->{passwd}\n";
    
    log::l("[drakproxy] Installation complete, exiting\n");
}

#---------------------------------------------
#                WONDERFULL pad
#---------------------------------------------
1;