summaryrefslogtreecommitdiffstats
path: root/perl-install/network/adsl.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-09-16 14:46:40 +0000
committerOlivier Blin <oblin@mandriva.org>2005-09-16 14:46:40 +0000
commitb43b55f6319184590c5921a841ae9061217983b6 (patch)
tree06fb5b955d9e5588733317e0bee13f1cda2623e8 /perl-install/network/adsl.pm
parent1470d382c894391e3fe46a0d22a02727e2369ac4 (diff)
downloaddrakx-b43b55f6319184590c5921a841ae9061217983b6.tar
drakx-b43b55f6319184590c5921a841ae9061217983b6.tar.gz
drakx-b43b55f6319184590c5921a841ae9061217983b6.tar.bz2
drakx-b43b55f6319184590c5921a841ae9061217983b6.tar.xz
drakx-b43b55f6319184590c5921a841ae9061217983b6.zip
fix probing of login name for pppoe connections (peers file is more important than pppoe.conf)
Diffstat (limited to 'perl-install/network/adsl.pm')
-rw-r--r--perl-install/network/adsl.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm
index 8939682d2..eb53bdc3d 100644
--- a/perl-install/network/adsl.pm
+++ b/perl-install/network/adsl.pm
@@ -12,11 +12,12 @@ use vars qw(@ISA @EXPORT);
sub adsl_probe_info {
my ($net) = @_;
my $pppoe_file = "$::prefix/etc/ppp/pppoe.conf";
- my %pppoe_conf; %pppoe_conf = getVarsFromSh($pppoe_file) if (!exists $net->{adsl}{method} || $net->{adsl}{method} eq 'pppoe') && -f $pppoe_file;
- my $login = $pppoe_conf{USER};
+ my $login;
foreach (qw(/etc/ppp/peers/ppp0 /etc/ppp/options /etc/ppp/options.adsl)) {
($login) = map { if_(/^user\s+"([^"]+)"/, $1) } cat_("$::prefix/$_") if !$login && -r "$::prefix/$_";
}
+ my %pppoe_conf; %pppoe_conf = getVarsFromSh($pppoe_file) if (!exists $net->{adsl}{method} || $net->{adsl}{method} eq 'pppoe') && -f $pppoe_file;
+ $login ||= $pppoe_conf{USER};
my $passwd = network::tools::passwd_by_login($login);
if (!$net->{adsl}{vpi} && !$net->{adsl}{vci}) {
($net->{adsl}{vpi}, $net->{adsl}{vci}) =