summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-01-20 14:57:03 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-01-20 14:57:03 +0000
commite2dbe75a0699f473b7f249081dce341bb3dd16f2 (patch)
treef83ad07936e2bcac06a048824dadf1e29c33392d /perl-install/network
parentd35bd3a96e87dcaf24be253b3c51935c0f8f9d2e (diff)
downloaddrakx-e2dbe75a0699f473b7f249081dce341bb3dd16f2.tar
drakx-e2dbe75a0699f473b7f249081dce341bb3dd16f2.tar.gz
drakx-e2dbe75a0699f473b7f249081dce341bb3dd16f2.tar.bz2
drakx-e2dbe75a0699f473b7f249081dce341bb3dd16f2.tar.xz
drakx-e2dbe75a0699f473b7f249081dce341bb3dd16f2.zip
handle more kppp options from new steps
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/modem.pm16
1 files changed, 12 insertions, 4 deletions
diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm
index 4407d64bf..57a420b95 100644
--- a/perl-install/network/modem.pm
+++ b/perl-install/network/modem.pm
@@ -18,7 +18,7 @@ sub ppp_configure {
any::devfssymlinkf($modem, 'modem') if $modem->{device} ne "/dev/modem";
- my %toreplace = map { $_ => $modem->{$_} } qw(connection phone login passwd auth domain dns1 dns2);
+ my %toreplace = map { $_ => $modem->{$_} } qw(auth AutoName connection dns1 dns2 domain IPAddr login passwd phone SubnetMask);
$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/[a-zA-Z]//g;
@@ -33,6 +33,14 @@ sub ppp_configure {
$toreplace{intf} ||= 'ppp0';
$toreplace{papname} = ($modem->{auth} eq 'PAP' || $modem->{auth} eq 'CHAP') && $toreplace{login};
+ # handle static/dynamic settings:
+ if ($modem->{auto_ip}) {
+ $toreplace{$_} = '0.0.0.0' foreach qw(IPAddr SubnetMask) ;
+ }
+ $toreplace{DNS} if $modem->{auto_dns};
+ $toreplace{Gateway} = '0.0.0.0' if $modem->{auto_gateway};
+
+
#- build ifcfg-ppp0.
my $various = <<END;
DEVICE="$toreplace{intf}"
@@ -119,7 +127,7 @@ END
[Account0]
ExDNSDisabled=0
-AutoName=0
+AutoName=$toreplace{AutoName}
ScriptArguments=
AccountingEnabled=0
DialString=ATDT
@@ -135,11 +143,11 @@ Command=
ScriptCommands=
Authentication=$toreplace{kpppauth}
DNS=$toreplace{dnsserver}
-SubnetMask=0.0.0.0
+SubnetMask=$toreplace{SubnetMask}
AccountingFile=
DefaultRoute=1
Username=$toreplace{login}
-Gateway=0.0.0.0
+Gateway=$toreplace{Gateway}
StorePassword=1
DisconnectCommand=