summaryrefslogtreecommitdiffstats
path: root/perl-install/network/tools.pm
diff options
context:
space:
mode:
authorArnaud Desmons <adesmons@mandriva.com>2002-12-04 15:46:13 +0000
committerArnaud Desmons <adesmons@mandriva.com>2002-12-04 15:46:13 +0000
commit478a36482072904543037d2dd3afe7b70071accc (patch)
tree27c1b53a271056b8f0ac40b480e7344a8e96d997 /perl-install/network/tools.pm
parent9dc9f6ccbf673822ad658e2f434aa149e332a377 (diff)
downloaddrakx-478a36482072904543037d2dd3afe7b70071accc.tar
drakx-478a36482072904543037d2dd3afe7b70071accc.tar.gz
drakx-478a36482072904543037d2dd3afe7b70071accc.tar.bz2
drakx-478a36482072904543037d2dd3afe7b70071accc.tar.xz
drakx-478a36482072904543037d2dd3afe7b70071accc.zip
More data are now fetched from system instead of drakconnect conf file
Diffstat (limited to 'perl-install/network/tools.pm')
-rw-r--r--perl-install/network/tools.pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index 0c65bb854..f25e00c72 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -33,6 +33,22 @@ sub write_secret_backend {
}
}
+sub read_secret_backend {
+ my $conf;
+ foreach my $i ("pap-secrets", "chap-secrets") {
+ foreach (cat_("$prefix/etc/ppp/$i")) {
+ my ($login, $server, $passwd) = split(' ');
+ ($a, $b, $c) = $passwd =~ /"(.*)"|'(.*)'|(.*)/;
+ $passwd = $a ? $a : $b ? $b : $c;
+ push @$conf, {login => $login,
+ passwd => $passwd,
+ server => $server };
+ }
+ }
+ $conf;
+}
+
+
sub ask_connect_now {
my ($type) = @_;
$::Wizard_no_previous = 1;