summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-03-24 14:08:27 +0000
committerFrancois Pons <fpons@mandriva.com>2003-03-24 14:08:27 +0000
commit87e27ed6fb5070c32e6ae6644925245bc874f732 (patch)
tree7440a94279b38a825eaa453f72c8eeda1f97205c /perl-install
parent6610ff95f647df15b8a4232b38f96280f70c41a8 (diff)
downloaddrakx-87e27ed6fb5070c32e6ae6644925245bc874f732.tar
drakx-87e27ed6fb5070c32e6ae6644925245bc874f732.tar.gz
drakx-87e27ed6fb5070c32e6ae6644925245bc874f732.tar.bz2
drakx-87e27ed6fb5070c32e6ae6644925245bc874f732.tar.xz
drakx-87e27ed6fb5070c32e6ae6644925245bc874f732.zip
added login and password retrieval for ppp0 in configure function.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/network/modem.pm12
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(