From e2dbe75a0699f473b7f249081dce341bb3dd16f2 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 20 Jan 2004 14:57:03 +0000 Subject: handle more kppp options from new steps --- perl-install/network/modem.pm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'perl-install/network/modem.pm') 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 = <