summaryrefslogtreecommitdiffstats
path: root/perl-install/network/network.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/network/network.pm')
-rw-r--r--perl-install/network/network.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index b31e36e9f..3e7f8222a 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -103,7 +103,9 @@ sub write_resolv_conf {
}
#- $options ||= "options timeout:1";
- close F; open F, ">$file" or die "cannot write $file: $!";
+ close F;
+ unlink $file; #- workaround situation when /etc/resolv.conf is an absolute link to /etc/ppp/resolv.conf or whatever
+ open F, ">$file" or die "cannot write $file: $!";
print F "# search $_\n" foreach grep { $_ ne "$netc->{DOMAINNAME} $netc->{DOMAINNAME2}" } sort { $search{$a} <=> $search{$b} } keys %search;
print F "search $netc->{DOMAINNAME} $netc->{DOMAINNAME2}\n" if ($netc->{DOMAINNAME} || $netc->{DOMAINNAME2});
#- print F "$options\n\n";