summaryrefslogtreecommitdiffstats
path: root/perl-install/network/adsl.pm
diff options
context:
space:
mode:
authorArnaud Desmons <adesmons@mandriva.com>2002-12-02 17:07:29 +0000
committerArnaud Desmons <adesmons@mandriva.com>2002-12-02 17:07:29 +0000
commit9a9961b6cf1ad884564dc3dca7e7e8447f2321e0 (patch)
tree7b66a49543bc0ba1266310e425db08d2e60a4f56 /perl-install/network/adsl.pm
parent0579c9250c7dfd98c0c47174fe000695921b39fb (diff)
downloaddrakx-9a9961b6cf1ad884564dc3dca7e7e8447f2321e0.tar
drakx-9a9961b6cf1ad884564dc3dca7e7e8447f2321e0.tar.gz
drakx-9a9961b6cf1ad884564dc3dca7e7e8447f2321e0.tar.bz2
drakx-9a9961b6cf1ad884564dc3dca7e7e8447f2321e0.tar.xz
drakx-9a9961b6cf1ad884564dc3dca7e7e8447f2321e0.zip
Some data are now fetched from system instead of drakconnect conf file (adsl, ppp, ifcfg-eth)
Diffstat (limited to 'perl-install/network/adsl.pm')
-rw-r--r--perl-install/network/adsl.pm12
1 files changed, 7 insertions, 5 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm
index 875da17b6..c9e8969b8 100644
--- a/perl-install/network/adsl.pm
+++ b/perl-install/network/adsl.pm
@@ -5,7 +5,7 @@ use run_program;
use network::tools;
use network::ethernet;
use modules;
-
+use Data::Dumper;
use vars qw(@ISA @EXPORT);
use MDK::Common::Globals "network", qw($in $prefix);
@@ -34,7 +34,7 @@ If you don't know, choose 'use pppoe'"), $l) or return;
if ($type eq 'pppoe') {
$in->do_pkgs->install("rp-$type");
$netcnx->{type} = "adsl_$type";
- $netcnx->{"adsl_$type"} = {};
+# $netcnx->{"adsl_$type"} = {};
adsl_conf($netcnx->{"adsl_$type"}, $netc, $intf, $type) or goto conf_adsl_step1;
#-network::configureNetwork($prefix, $netc, $in, $intf, $first_time);
# if ($::isStandalone and $netc->{NET_DEVICE}) {
@@ -83,9 +83,11 @@ If you don't know, choose 'use pppoe'"), $l) or return;
}
sub adsl_ask_info {
- my ($adsl, $netc, $intf) = @_;
+ my ($adsl, $netc, $intf, $adsl_type) = @_;
+ my $pppoe_file = "/etc/ppp/pppoe.conf";
+ my $pppoe_conf = { getVarsFromSh($pppoe_file) } if ($adsl_type =~ /pppoe/ && -f $pppoe_file);
add2hash($netc, { dnsServer2 => '', dnsServer3 => '', DOMAINNAME2 => '' });
- add2hash($adsl, { login => '', passwd => '', passwd2 => '' });
+ add2hash($adsl, { login => "$pppoe_conf->{USER}", passwd => '', passwd2 => '' });
ask_info2($adsl, $netc);
}
@@ -101,7 +103,7 @@ sub adsl_conf {
my ($adsl, $netc, $intf, $adsl_type) = @_;
adsl_conf_step_1:
- adsl_ask_info($adsl, $netc, $intf) or return;
+ adsl_ask_info ($adsl, $netc, $intf, $adsl_type) or return;
adsl_conf_step_2:
$adsl_type =~ /speedtouch|eci/ or conf_network_card($netc, $intf, 'static', '10.0.0.10') or goto adsl_conf_step_1;
adsl_conf_backend($adsl, $netc, $adsl_type);