diff options
Diffstat (limited to 'perl-install/network/modem.pm')
-rw-r--r-- | perl-install/network/modem.pm | 12 |
1 files 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( |