summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-02-04 16:10:12 +0000
committerOlivier Blin <oblin@mandriva.org>2005-02-04 16:10:12 +0000
commit559fa330f771841144bd5d37b20aab90b9692c01 (patch)
tree572233bb4bdd4d302b497d576245ea521dd5989d /perl-install/network
parentfa8c21b68060b62e5a063171648a8d97d6030fc7 (diff)
downloaddrakx-559fa330f771841144bd5d37b20aab90b9692c01.tar
drakx-559fa330f771841144bd5d37b20aab90b9692c01.tar.gz
drakx-559fa330f771841144bd5d37b20aab90b9692c01.tar.bz2
drakx-559fa330f771841144bd5d37b20aab90b9692c01.tar.xz
drakx-559fa330f771841144bd5d37b20aab90b9692c01.zip
add bpalogin support for cable connections
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/netconnect.pm34
1 files changed, 30 insertions, 4 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 56c08541f..1fb568773 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -83,6 +83,7 @@ sub real_main {
my ($network_configured, $cnx_type, $type, @all_cards, %eth_intf, %all_eth_intf);
my (%connections, @connection_list, $is_wireless);
my ($modem, $modem_name, $modem_conf_read, $modem_dyn_dns, $modem_dyn_ip);
+ my $cable_no_auth;
my ($adsl_type, @adsl_devices, $adsl_failed, $adsl_answer, %adsl_data, $adsl_data, $adsl_provider, $adsl_old_provider);
my ($ntf_name, $gateway_ex, $up, $need_restart_network);
my ($isdn, $isdn_name, $isdn_type, %isdn_cards, @isdn_dial_methods);
@@ -266,10 +267,6 @@ sub real_main {
#- why read again the net_conf here?
read_net_conf($netcnx, $netc, $intf) if $::isInstall; # :-(
$type = $netcnx->{type} = $connections{$cnx_type};
- if ($type eq 'cable') {
- $auto_ip = 1;
- return "lan";
- }
return $type;
},
},
@@ -319,6 +316,35 @@ sub real_main {
},
},
+ cable =>
+ {
+ pre => sub {
+ $cable_no_auth = sub { $netc->{bpalogin} eq N("None") };
+ },
+ name => N("Cable: account options"),
+ data => sub {
+ [
+ { label => N("Authentication"), type => "list", val => \$netc->{bpalogin}, list => [ N("None"), N("Use BPALogin (needed for Telstra)") ] },
+ { label => N("Account Login (user name)"), val => \$netcnx->{login}, disabled => $cable_no_auth },
+ { label => N("Account Password"), val => \$netcnx->{passwd}, hidden => 1, disabled => $cable_no_auth },
+ ];
+ },
+ post => sub {
+ unless ($cable_no_auth->()) {
+ substInFile {
+ s/username\s+.*\n/username $netcnx->{login}\n/;
+ s/password\s+.*\n/password $netcnx->{passwd}\n/;
+ } "$::prefix/etc/bpalogin.conf";
+ if ($in->do_pkgs->install("bpalogin")) {
+ require services;
+ services::restart("bpalogin");
+ }
+ }
+ $auto_ip = 1;
+ return "lan";
+ }
+ },
+
isdn =>
{
pre=> sub {