diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2002-09-26 15:37:39 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2002-09-26 15:37:39 +0000 |
commit | 2401671895ff60401e8169601fe907455392bcd6 (patch) | |
tree | c07097695b9411889d3cc298a5c9582d88465fc6 | |
parent | 680ee6c76d1486c28fd152687e95e4d9d45c8f78 (diff) | |
download | drakx-2401671895ff60401e8169601fe907455392bcd6.tar drakx-2401671895ff60401e8169601fe907455392bcd6.tar.gz drakx-2401671895ff60401e8169601fe907455392bcd6.tar.bz2 drakx-2401671895ff60401e8169601fe907455392bcd6.tar.xz drakx-2401671895ff60401e8169601fe907455392bcd6.zip |
workaround situation when /etc/resolv.conf is an absolute link to /etc/ppp/resolv.conf or whatever
-rw-r--r-- | perl-install/network/network.pm | 4 |
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"; |