From 6528119c032634c3da899cc059f09f266e81ab31 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 5 Apr 2010 20:12:16 +0000 Subject: [PATCH] -Fix problem where makedns -n with named already running would fail -Fix problem where the final update payload of a zone would never be sent git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5675 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/dns.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/dns.pm b/xCAT-server/lib/xcat/plugins/dns.pm index 6f828d740..5dd4761be 100644 --- a/xCAT-server/lib/xcat/plugins/dns.pm +++ b/xCAT-server/lib/xcat/plugins/dns.pm @@ -191,6 +191,7 @@ sub process_request { $ctx->{dnsupdaters} = \@nservers; } if ($zapfiles) { #here, we unlink all the existing files to start fresh + system("/sbin/service named stop"); #named may otherwise hold on to stale journal filehandles unlink "/etc/named.conf"; foreach () { unlink $_; @@ -543,7 +544,7 @@ sub add_records { $update = Net::DNS::Update->new($zone); #new empty request } } - if ($numreqs == 300) { #either no entries at all to begin with or a perfect multiple of 300 + if ($numreqs != 300) { #either no entries at all to begin with or a perfect multiple of 300 $update->sign_tsig("xcat_key",$ctx->{privkey}); my $reply = $resolver->send($update); }