summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2002-09-26 15:37:39 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2002-09-26 15:37:39 +0000
commit2401671895ff60401e8169601fe907455392bcd6 (patch)
treec07097695b9411889d3cc298a5c9582d88465fc6 /perl-install
parent680ee6c76d1486c28fd152687e95e4d9d45c8f78 (diff)
downloaddrakx-backup-do-not-use-2401671895ff60401e8169601fe907455392bcd6.tar
drakx-backup-do-not-use-2401671895ff60401e8169601fe907455392bcd6.tar.gz
drakx-backup-do-not-use-2401671895ff60401e8169601fe907455392bcd6.tar.bz2
drakx-backup-do-not-use-2401671895ff60401e8169601fe907455392bcd6.tar.xz
drakx-backup-do-not-use-2401671895ff60401e8169601fe907455392bcd6.zip
workaround situation when /etc/resolv.conf is an absolute link to /etc/ppp/resolv.conf or whatever
Diffstat (limited to 'perl-install')
-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";