summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-08-27 10:09:37 +0000
committerFrancois Pons <fpons@mandriva.com>2001-08-27 10:09:37 +0000
commitb8c1bee3b538dfc0d07337dc1ca913e8740f3890 (patch)
treeaf95464d61bde95693c5255b988baee384865580 /perl-install
parent21ace422df966ecefdb6f7bda8a45615b4a22a8d (diff)
downloaddrakx-b8c1bee3b538dfc0d07337dc1ca913e8740f3890.tar
drakx-b8c1bee3b538dfc0d07337dc1ca913e8740f3890.tar.gz
drakx-b8c1bee3b538dfc0d07337dc1ca913e8740f3890.tar.bz2
drakx-b8c1bee3b538dfc0d07337dc1ca913e8740f3890.tar.xz
drakx-b8c1bee3b538dfc0d07337dc1ca913e8740f3890.zip
added Borsenkow Andrej patch to support CHAP again.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/any.pm6
-rw-r--r--perl-install/network/modem.pm2
-rwxr-xr-xperl-install/standalone/draknet2
3 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 3b395e0f8..2522aac35 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -406,6 +406,7 @@ sub pppConfig {
my %toreplace;
$toreplace{$_} = $modem->{$_} foreach qw(connection phone login passwd auth domain dns1 dns2);
$toreplace{kpppauth} = ${{ 'Script-based' => 0, 'PAP' => 1, 'Terminal-based' => 2, }}{$modem->{auth}};
+ $toreplace{kpppauth} = ${{ 'Script-based' => 0, 'PAP' => 1, 'Terminal-based' => 2, 'CHAP' => 3 }}{$modem->{auth}};
$toreplace{phone} =~ s/\D//g;
$toreplace{dnsserver} = join ',', map { $modem->{$_} } "dns1", "dns2";
$toreplace{dnsserver} .= $toreplace{dnsserver} && ',';
@@ -416,7 +417,7 @@ sub pppConfig {
$toreplace{connection} ||= 'DialupConnection';
$toreplace{domain} ||= 'localdomain';
$toreplace{intf} ||= 'ppp0';
- $toreplace{papname} = $modem->{auth} eq 'PAP' && $toreplace{login};
+ $toreplace{papname} = ($modem->{auth} eq 'PAP' || $modem->{auth} eq 'CHAP') && $toreplace{login};
#- build ifcfg-ppp0.
my $ifcfg = "$prefix/etc/sysconfig/network-scripts/ifcfg-ppp0";
@@ -489,7 +490,7 @@ END
close CHAT;
chmod 0600, $chat;
- if ($modem->{auth} eq 'PAP') {
+ if ($modem->{auth} eq 'PAP' || $modem->{auth} eq 'CHAP') {
#- need to create a secrets file for the connection.
my $secrets = "$prefix/etc/ppp/" . lc($modem->{auth}) . "-secrets";
my @l = cat_($secrets);
@@ -521,6 +522,7 @@ ExDNSDisabled=0
AutoName=0
ScriptArguments=
AccountingEnabled=0
+DialString=ATDT
Phonenumber=$toreplace{phone}
IPAddr=0.0.0.0
Domain=$toreplace{domain}
diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm
index 893a68119..75a7a1ed9 100644
--- a/perl-install/network/modem.pm
+++ b/perl-install/network/modem.pm
@@ -44,7 +44,7 @@ sub pppConfig {
{ label => _("Phone number"), val => \$modem->{phone} },
{ label => _("Login ID"), val => \$modem->{login} },
{ label => _("Password"), val => \$modem->{passwd}, hidden => 1 },
-{ label => _("Authentication"), val => \$modem->{auth}, list => [ __("PAP"), __("Terminal-based"), __("Script-based") ] },
+{ label => _("Authentication"), val => \$modem->{auth}, list => [ __("PAP"), __("Terminal-based"), __("Script-based"), __("CHAP") ] },
{ label => _("Domain name"), val => \$modem->{domain} },
{ label => _("First DNS Server (optional)"), val => \$modem->{dns1} },
{ label => _("Second DNS Server (optional)"), val => \$modem->{dns2} },
diff --git a/perl-install/standalone/draknet b/perl-install/standalone/draknet
index bfc59a775..9ea2d223d 100755
--- a/perl-install/standalone/draknet
+++ b/perl-install/standalone/draknet
@@ -590,7 +590,7 @@ Create one first by clicking on 'Configure'")),1,1,0);
[_("Phone number"), \$cnx->{phone} ],
[_("Login ID"), \$cnx->{login} ],
[_("Password"), \$cnx->{passwd} ],
- [_("Authentication"), \$cnx->{auth}, [ _("PAP"), _("Terminal-based"), _("Script-based") ] ],
+ [_("Authentication"), \$cnx->{auth}, [ _("PAP"), _("Terminal-based"), _("Script-based"), __("CHAP") ] ],
[_("Domain name"), \$cnx->{domain} ],
[_("First DNS Server (optional)"), \$cnx->{dns1} ],
[_("Second DNS Server (optional)"), \$cnx->{dns2} ],