diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-01-27 17:05:47 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-01-27 17:05:47 +0000 |
commit | aa5366dbd3e552b13205f7d6a39aab27f81c9150 (patch) | |
tree | 36166572d771b5e208894a3e3a32f06a581623ff | |
parent | ab2525ae1b1ac1de878de40a74ab1f904718d69c (diff) | |
download | drakx-backup-do-not-use-aa5366dbd3e552b13205f7d6a39aab27f81c9150.tar drakx-backup-do-not-use-aa5366dbd3e552b13205f7d6a39aab27f81c9150.tar.gz drakx-backup-do-not-use-aa5366dbd3e552b13205f7d6a39aab27f81c9150.tar.bz2 drakx-backup-do-not-use-aa5366dbd3e552b13205f7d6a39aab27f81c9150.tar.xz drakx-backup-do-not-use-aa5366dbd3e552b13205f7d6a39aab27f81c9150.zip |
get encapsulation default value from provider db and offer to configure it
-rw-r--r-- | perl-install/network/netconnect.pm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 8a2dff2f5..9275137c6 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -162,6 +162,15 @@ sub get_subwizard { pppoa => N("PPP over ATM (PPPoA)"), ); + my $encapsulation; + my %encapsulations = ( + N("Bridged Ethernet LLC") => 1, + N("Bridged Ethernet VC") => 2, + N("Routed IP LLC") => 3, + N("Routed IP VC") => 4, + N("PPPOA LLC") => 5, + N("PPPOA VC") => 6, + ); # main wizard: my $wiz; @@ -594,7 +603,7 @@ killall pppd post => sub { $adsl_data = $adsl_data{$adsl_provider}; if ($adsl_provider ne $adsl_old_provider) { - $netc->{$_} = $adsl_data->{$_} foreach qw(dnsServer2 dnsServer3 DOMAINNAME2 vpi vci); + $netc->{$_} = $adsl_data->{$_} foreach qw(dnsServer2 dnsServer3 DOMAINNAME2 Encapsulation vpi vci); $adsl_protocol = $adsl_types{$adsl_data->{method}}; } $adsl_protocol = $adsl_types{pppoa} if $adsl_device eq 'speedtouch'; @@ -695,6 +704,7 @@ If you don't know, choose 'use pppoe'"), pre => sub { $netc->{dnsServer2} ||= $adsl_data->{dns1}; $netc->{dnsServer3} ||= $adsl_data->{dns2}; + $encapsulation ||= find { $encapsulations{$_} eq $netc->{Encapsulation} } keys %encapsulations; }, name => N("Connection Configuration") . "\n\n" . N("Please fill or check the field below"), @@ -705,6 +715,7 @@ If you don't know, choose 'use pppoe'"), { label => N("Second DNS Server (optional)"), val => \$netc->{dnsServer3} }, { label => N("Account Login (user name)"), val => \$netcnx->{login} }, { label => N("Account Password"), val => \$netcnx->{passwd}, hidden => 1 }, + { label => N("Encapsulation :"), val => \$encapsulation, list => [ sort keys %encapsulations ], }, ], }, post => sub { @@ -716,6 +727,7 @@ If you don't know, choose 'use pppoe'"), N("United Kingdom") => [ 0, 38 ], N("United States") => [ 8, 35 ], ); + $netc->{Encapsulation} = $encapsulations{$encapsulation}; ($netc->{vpi}, $netc->{vci}) = @{$h{$netcnx->{country}}}; } network::adsl::adsl_conf_backend($netcnx, $netc, $adsl_device, $adsl_type); #FIXMEl |