diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-01-20 15:13:22 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-01-20 15:13:22 +0000 |
commit | d69afe03df179f8d949fafb6cacf8213ede78d01 (patch) | |
tree | f07e5c1a7300eb7371bb0c3d1c9c5829259ab267 /perl-install/network | |
parent | e6a515c10b7e21aa7cf60b12bcbe0888ed83cac8 (diff) | |
download | drakx-d69afe03df179f8d949fafb6cacf8213ede78d01.tar drakx-d69afe03df179f8d949fafb6cacf8213ede78d01.tar.gz drakx-d69afe03df179f8d949fafb6cacf8213ede78d01.tar.bz2 drakx-d69afe03df179f8d949fafb6cacf8213ede78d01.tar.xz drakx-d69afe03df179f8d949fafb6cacf8213ede78d01.zip |
fix static/dyn settings
Diffstat (limited to 'perl-install/network')
-rw-r--r-- | perl-install/network/modem.pm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm index aa6551b87..0619abe58 100644 --- a/perl-install/network/modem.pm +++ b/perl-install/network/modem.pm @@ -21,8 +21,10 @@ sub ppp_configure { my %toreplace = map { $_ => $modem->{$_} } qw(auth AutoName connection dns1 dns2 domain IPAddr login passwd phone SubnetMask); $toreplace{kpppauth} = ${{ N('Script-based') => 0, N('PAP') => 1, N('Terminal-based') => 2, N('CHAP') => 3, N('PAP/CHAP') => 4 }}{$modem->{auth}}; $toreplace{phone} =~ s/[a-zA-Z]//g; - $toreplace{dnsserver} = join ',', map { $modem->{$_} } "dns1", "dns2"; - $toreplace{dnsserver} .= $toreplace{dnsserver} && ','; + if ($modem->{auto_dns} ne N("Automatic")) { + $toreplace{dnsserver} = join ',', map { $modem->{$_} } "dns1", "dns2"; + $toreplace{dnsserver} .= $toreplace{dnsserver} && ','; + } #- using peerdns or dns1,dns2 avoid writing a /etc/resolv.conf file. $toreplace{peerdns} = "yes"; @@ -33,11 +35,10 @@ sub ppp_configure { $toreplace{papname} = ($modem->{auth} eq 'PAP' || $modem->{auth} eq 'CHAP') && $toreplace{login}; # handle static/dynamic settings: - if ($modem->{auto_ip}) { + if ($modem->{auto_ip} eq N("Automatic")) { $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}; + $toreplace{Gateway} = '0.0.0.0' if $modem->{auto_gateway} eq N("Automatic"); #- build ifcfg-ppp0. @@ -68,7 +69,7 @@ PEERDNS="$toreplace{peerdns}" END output("$::prefix/etc/sysconfig/network-scripts/ifcfg-ppp0", $various, - map { qq(DNS$_=$toreplace{"dns$_"}\n) } grep { $toreplace{"dns$_"} } 1..2); + if_($modem->{auto_dns} ne N("Automatic"), map { qq(DNS$_=$toreplace{"dns$_"}\n) } grep { $toreplace{"dns$_"} } 1..2)); #- build chat-ppp0. my @chat = <<END; |