summaryrefslogtreecommitdiffstats
path: root/lib
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 /lib
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)
Diffstat (limited to 'lib')
-rw-r--r--lib/network/network.pm11
1 files changed, 10 insertions, 1 deletions
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 {