mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Freeze and thaw zones when reloading
This commit is contained in:
@@ -129,3 +129,4 @@ IPv6 addresses can now be used for remote nameservers in slave and delegation zo
|
||||
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.
|
||||
|
||||
@@ -1911,15 +1911,23 @@ return undef;
|
||||
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
|
||||
@@ -1937,7 +1945,7 @@ if ($out =~ /not found/i) {
|
||||
}
|
||||
}
|
||||
}
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user