summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-03-03 14:26:18 +0000
committerFrancois Pons <fpons@mandriva.com>2003-03-03 14:26:18 +0000
commit5f5c40b9b515a39a82e6b08308d97102eddc0934 (patch)
treefdde946cec943f15952d608a02e285421827f227 /perl-install/network
parent79b072964b5f9583d0f0af8e774d0c0ec6cd12c5 (diff)
downloaddrakx-backup-do-not-use-5f5c40b9b515a39a82e6b08308d97102eddc0934.tar
drakx-backup-do-not-use-5f5c40b9b515a39a82e6b08308d97102eddc0934.tar.gz
drakx-backup-do-not-use-5f5c40b9b515a39a82e6b08308d97102eddc0934.tar.bz2
drakx-backup-do-not-use-5f5c40b9b515a39a82e6b08308d97102eddc0934.tar.xz
drakx-backup-do-not-use-5f5c40b9b515a39a82e6b08308d97102eddc0934.zip
simplified code of adsl_ask_info, password can be retrieved using
passwd_by_login which was not used with computed login from /etc/ppp/peers/adsl or /etc/ppp/options or /etc/ppp/options.adsl.
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/adsl.pm7
1 files changed, 1 insertions, 6 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm
index a46f58878..b94497d1f 100644
--- a/perl-install/network/adsl.pm
+++ b/perl-install/network/adsl.pm
@@ -78,12 +78,7 @@ sub adsl_ask_info {
next if $login && ! -r $_;
($login) = map { if_(/^user\s+\"([^\"]+)\"/, $1) } cat_($_);
}
- my $passwd = passwd_by_login($pppoe_conf{USER});
- foreach (qw(/etc/ppp/pap-secrets /etc/ppp/chap-secrets)) {
- next if $passwd && ! -r $_;
- my $qlogin = quotemeta $login;
- ($passwd) = map { if_(/^(['"]?)$qlogin\1\s+\S+\s+(['"]?)(\S*)\2/, $3) } cat_($_);
- }
+ my $passwd = passwd_by_login($login);
$pppoe_conf{DNS1} ||= '';
$pppoe_conf{DNS2} ||= '';
add2hash($netc, { dnsServer2 => $pppoe_conf{DNS1}, dnsServer3 => $pppoe_conf{DNS2}, DOMAINNAME2 => '' });