From b8c1bee3b538dfc0d07337dc1ca913e8740f3890 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 27 Aug 2001 10:09:37 +0000 Subject: added Borsenkow Andrej patch to support CHAP again. --- perl-install/any.pm | 6 ++++-- perl-install/network/modem.pm | 2 +- perl-install/standalone/draknet | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'perl-install') 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} ], -- cgit v1.2.1