summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Matsuoka <claudio@mandriva.com>2010-03-04 19:43:57 +0000
committerClaudio Matsuoka <claudio@mandriva.com>2010-03-04 19:43:57 +0000
commit44ee35e262f43f895c654627e3f2d567a4455200 (patch)
treecf02d0e491f76f684927c77214d13b749aaacb08
parent9dc6fe9a88114e78f1910795fb87006fd1f54d15 (diff)
downloaddrakx-net-44ee35e262f43f895c654627e3f2d567a4455200.tar
drakx-net-44ee35e262f43f895c654627e3f2d567a4455200.tar.gz
drakx-net-44ee35e262f43f895c654627e3f2d567a4455200.tar.bz2
drakx-net-44ee35e262f43f895c654627e3f2d567a4455200.tar.xz
drakx-net-44ee35e262f43f895c654627e3f2d567a4455200.zip
write name servers to correct file (#54180)
-rw-r--r--NEWS2
-rw-r--r--lib/network/network.pm11
2 files changed, 12 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index db23cc2..c7ea4b9 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- write name servers to correct file (/etc/resolvconf/run/interfaces/<iface>
+ instead of /etc/resolv.conf which gets overwritten) (#54180)
- properly update /etc/hosts file when there are multiple aliases for the
the same ip (#30168).
- ndiswrapper support:
diff --git a/lib/network/network.pm b/lib/network/network.pm
index fa8df00..26f4600 100644
--- a/lib/network/network.pm
+++ b/lib/network/network.pm
@@ -126,10 +126,17 @@ sub write_zeroconf {
services::set_status('tmdns', $net->{zeroconf}{hostname}, $::isInstall);
}
+sub update_resolv_conf {
+ # is there a better way to do this?
+ system "/etc/init.d/resolvconf reload";
+}
+
sub write_resolv_conf {
my ($net) = @_;
my $resolv = $net->{resolv};
- my $file = $::prefix . $resolv_file;
+ # (bug #54180)
+ #my $file = $::prefix . $resolv_file;
+ my $file = $::prefix . "/etc/resolvconf/run/interface/" . $net->{net_interface};
my %new = (
search => [ grep { $_ } uniq(@$resolv{'DOMAINNAME', 'DOMAINNAME2', 'DOMAINNAME3'}) ],
@@ -165,6 +172,8 @@ sub write_resolv_conf {
};
output_with_perm($file, 0644, @search, @nameserver, (map { "# $_\n" } @unknown), "\n# ppp temp entry\n");
+ update_resolv_conf();
+
#-res_init(); # reinit the resolver so DNS changes take affect
1;
} else {