summaryrefslogtreecommitdiffstats
path: root/lib/network/modem.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-05-25 15:39:46 +0000
committerOlivier Blin <oblin@mandriva.com>2007-05-25 15:39:46 +0000
commit1d37bfdbbe874abd6dcb5563eea19f531de09e1c (patch)
tree74845e43ed8fa59c7aaafd1a87efaa6b0c83c228 /lib/network/modem.pm
parentc6ba983db7d5a82ee63599e775be0f8211447c72 (diff)
downloaddrakx-net-1d37bfdbbe874abd6dcb5563eea19f531de09e1c.tar
drakx-net-1d37bfdbbe874abd6dcb5563eea19f531de09e1c.tar.gz
drakx-net-1d37bfdbbe874abd6dcb5563eea19f531de09e1c.tar.bz2
drakx-net-1d37bfdbbe874abd6dcb5563eea19f531de09e1c.tar.xz
drakx-net-1d37bfdbbe874abd6dcb5563eea19f531de09e1c.zip
sync with 2007.1 (because of SVN loss)2007.1
Diffstat (limited to 'lib/network/modem.pm')
-rw-r--r--lib/network/modem.pm9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/network/modem.pm b/lib/network/modem.pm
index 29afb69..839b71c 100644
--- a/lib/network/modem.pm
+++ b/lib/network/modem.pm
@@ -37,12 +37,7 @@ sub ppp_read_conf() {
/^METRIC=(.*)/ and $modem->{METRIC} = $1;
}
$modem->{login} ||= $l{Username};
- my $secret = network::tools::read_secret_backend();
- foreach (@$secret) {
- $modem->{passwd} ||= $_->{passwd} if $_->{login} eq $modem->{login};
- }
- #my $secret = network::tools::read_secret_backend();
- #my @cnx_list = map { $_->{server} } @$secret;
+ $modem->{passwd} = network::tools::passwd_by_login($modem->{login});
$modem->{$_} ||= '' foreach qw(connection phone login passwd auth domain dns1 dns2);
$modem->{auto_gateway} ||= defined $modem->{Gateway} && $modem->{Gateway} ne '0.0.0.0' ? N("Manual") : N("Automatic");
$modem->{auto_ip} ||= defined $modem->{IPAddr} && $modem->{IPAddr} ne '0.0.0.0' ? N("Manual") : N("Automatic");
@@ -60,7 +55,7 @@ sub ppp_configure {
if ($modem->{device} ne "/dev/modem") {
my $dev = $modem->{device};
$dev =~ s!^/dev/!!;
- any::devfssymlinkf({ device => $dev }, 'modem');
+ devices::symlink_now_and_register({ device => $dev }, 'modem');
}
my %toreplace = map { $_ => $modem->{$_} } qw(Authentication AutoName connection dns1 dns2 domain IPAddr login passwd phone SubnetMask);