From 87e27ed6fb5070c32e6ae6644925245bc874f732 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 24 Mar 2003 14:08:27 +0000 Subject: added login and password retrieval for ppp0 in configure function. --- perl-install/network/modem.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm index faaee4e5b..82461dea9 100644 --- a/perl-install/network/modem.pm +++ b/perl-install/network/modem.pm @@ -21,17 +21,17 @@ sub configure { foreach (cat_("/usr/share/config/kppprc")) { /^DNS=(.*)$/ and ($modem->{dns1}, $modem->{dns2}) = split(',', $1); } + foreach (cat_("/etc/sysconfig/network-scripts/chat-ppp0")) { + /.*ATDT(\d*).*/ and $modem->{phone} = $1; + } + foreach (cat_("/etc/sysconfig/network-scripts/ifcfg-ppp0")) { + /NAME=(['"]?)(.*)\1/ and $modem->{login} = $2; + } my $secret = network::tools::read_secret_backend(); foreach (@$secret) { $modem->{passwd} = $_->{passwd} if $_->{login} eq $modem->{login}; } - foreach (cat_("/etc/sysconfig/network-scripts/chat-ppp0")) { - if (/.*ATDT(\d*).*/) { - $modem->{phone} = $1; - last; - } - } ppp_choose($in, $netc, $modem, $mouse) or return; write_cnx_script($netc, "modem", q( -- cgit v1.2.1