diff options
author | Frederic Lepied <flepied@mandriva.com> | 2003-03-05 22:40:55 +0000 |
---|---|---|
committer | Frederic Lepied <flepied@mandriva.com> | 2003-03-05 22:40:55 +0000 |
commit | 29e94f03ce0828add55b9f52c685d85e6f3e7d58 (patch) | |
tree | fa353b42222b95b94c7f1b1153cda30de9cbde6a /perl-install/network/adsl.pm | |
parent | 15fb5ad3abbba880f35204d0337ab139cb85184a (diff) | |
download | drakx-backup-do-not-use-29e94f03ce0828add55b9f52c685d85e6f3e7d58.tar drakx-backup-do-not-use-29e94f03ce0828add55b9f52c685d85e6f3e7d58.tar.gz drakx-backup-do-not-use-29e94f03ce0828add55b9f52c685d85e6f3e7d58.tar.bz2 drakx-backup-do-not-use-29e94f03ce0828add55b9f52c685d85e6f3e7d58.tar.xz drakx-backup-do-not-use-29e94f03ce0828add55b9f52c685d85e6f3e7d58.zip |
read login name from net_cnx_up in pptp mode.
Diffstat (limited to 'perl-install/network/adsl.pm')
-rw-r--r-- | perl-install/network/adsl.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm index b94497d1f..a09f58ee3 100644 --- a/perl-install/network/adsl.pm +++ b/perl-install/network/adsl.pm @@ -72,12 +72,14 @@ If you don't know, choose 'use pppoe'"), $l) or return; sub adsl_ask_info { my ($adsl, $netc, $_intf, $adsl_type) = @_; my $pppoe_file = "/etc/ppp/pppoe.conf"; + my $pptp_file = '/etc/sysconfig/network-scripts/net_cnx_up'; my %pppoe_conf; %pppoe_conf = getVarsFromSh($pppoe_file) if $adsl_type =~ /pppoe/ && -f $pppoe_file; my $login = $pppoe_conf{USER}; foreach (qw(/etc/ppp/peers/adsl /etc/ppp/options /etc/ppp/options.adsl)) { next if $login && ! -r $_; ($login) = map { if_(/^user\s+\"([^\"]+)\"/, $1) } cat_($_); } + ($login) = map { if_(/\sname\s+([^ \n]+)/, $1) } cat_($pptp_file) if $adsl_type =~ /pptp/ && -r $pptp_file; my $passwd = passwd_by_login($login); $pppoe_conf{DNS1} ||= ''; $pppoe_conf{DNS2} ||= ''; |