diff options
author | damien <damien@mandriva.com> | 2000-09-26 11:04:30 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2000-09-26 11:04:30 +0000 |
commit | 8067fc84e34b556b56a4a14a77067ed4d78b7a44 (patch) | |
tree | 74d01b923d2a4e04306b8a3b99bf0867e19faa2d | |
parent | dce65aa28b3323baa30c506eee9161a30c56348f (diff) | |
download | drakx-8067fc84e34b556b56a4a14a77067ed4d78b7a44.tar drakx-8067fc84e34b556b56a4a14a77067ed4d78b7a44.tar.gz drakx-8067fc84e34b556b56a4a14a77067ed4d78b7a44.tar.bz2 drakx-8067fc84e34b556b56a4a14a77067ed4d78b7a44.tar.xz drakx-8067fc84e34b556b56a4a14a77067ed4d78b7a44.zip |
updated
-rw-r--r-- | perl-install/network.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/network.pm b/perl-install/network.pm index 2aa9b0827..f38c1675b 100644 --- a/perl-install/network.pm +++ b/perl-install/network.pm @@ -88,10 +88,12 @@ sub write_resolv_conf { my (%search, %dns, @unknown); local *F; open F, $file; + my $a; foreach (<F>) { /^[#\s]*search\s+(.*?)\s*$/ and $search{$1} = $., next; /^[#\s]*nameserver\s+(.*?)\s*$/ and $dns{$1} = $., next; /^[#\s]*(\S.*?)\s*$/ and push @unknown, $1; + /^# ppp temp entry$/ and $a=1; } close F; open F, ">$file" or die "cannot write $file: $!"; @@ -99,7 +101,7 @@ sub write_resolv_conf { print F "search $netc->{DOMAINNAME} $netc->{DOMAINNAME2}\n\n" if ($netc->{DOMAINNAME} || $netc->{DOMAINNAME2}); print F "# nameserver $_\n" foreach grep { ! exists $used_dns{$_} } sort { $dns{$a} <=> $dns{$b} } keys %dns; print F "nameserver $_\n" foreach sort { $used_dns{$a} <=> $used_dns{$b} } grep { $_ } keys %used_dns; - $netc->{NET_PROTOCOL} =~ /ppp/ and print F "# ppp temp entry\n"; + $a and print F "# ppp temp entry\n"; print F "\n"; print F "# $_\n" foreach @unknown; |