Added the Test Zone Transfer button to the slave zone page, to check if zone transfers are possible or not.
---- Changes since 1.550 ----
Links for editing and deleting records now using the record name instead of an index, which makes editing more reliable if records are also being updated by dynamic DNS or some other tool.
+When a zone is reloaded, it is now frozed first and then thawed afterwards with the rndc command, to better support dynamic DNS.
sub restart_zone
{
local ($dom, $view) = @_;
-local $out;
+local ($out, $ex);
if ($view) {
# Reload a zone in a view
+ &try_cmd("freeze ".quotemeta($dom)." IN ".quotemeta($view).
+ " 2>&1 </dev/null");
$out = &try_cmd("reload ".quotemeta($dom)." IN ".quotemeta($view).
" 2>&1 </dev/null");
+ $ex = $?;
+ &try_cmd("thaw ".quotemeta($dom)." IN ".quotemeta($view).
+ " 2>&1 </dev/null");
}
else {
# Just reload one top-level zone
+ &try_cmd("freeze ".quotemeta($dom)." 2>&1 </dev/null");
$out = &try_cmd("reload ".quotemeta($dom)." 2>&1 </dev/null");
+ $ex = $?;
+ &try_cmd("thaw ".quotemeta($dom)." 2>&1 </dev/null");
}
if ($out =~ /not found/i) {
# Zone is not known to BIND yet - do a total reload
}
}
}
-elsif ($? || $out =~ /failed|not found|error/i) {
+elsif ($ex || $out =~ /failed|not found|error/i) {
return &text('restart_endc', "<tt>".&html_escape($out)."</tt>");
}
&refresh_nscd();