Commit 5fe21da3 authored by Mark Andrews's avatar Mark Andrews

999. [func] "rndc retransfer zone [class [view]]" added.

                        [RT #1752]
parent 5fe1a246
999. [func] "rndc retransfer zone [class [view]]" added.
[RT #1752]
998. [func] named-checkzone now has arguements to specify the
chroot directory (-t) and working directory (-w).
[RT #1755]
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: control.c,v 1.7 2001/05/31 01:21:06 bwelling Exp $ */
/* $Id: control.c,v 1.8 2001/09/15 14:23:22 marka Exp $ */
#include <config.h>
......@@ -85,6 +85,8 @@ ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) {
result = ns_server_reconfigcommand(ns_g_server, command);
} else if (command_compare(command, NS_COMMAND_REFRESH)) {
result = ns_server_refreshcommand(ns_g_server, command);
} else if (command_compare(command, NS_COMMAND_RETRANSFER)) {
result = ns_server_retransfercommand(ns_g_server, command);
} else if (command_compare(command, NS_COMMAND_HALT)) {
ns_server_flushonshutdown(ns_g_server, ISC_FALSE);
isc_app_shutdown();
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: control.h,v 1.6 2001/05/08 04:09:40 bwelling Exp $ */
/* $Id: control.h,v 1.7 2001/09/15 14:23:25 marka Exp $ */
#ifndef NAMED_CONTROL_H
#define NAMED_CONTROL_H 1
......@@ -36,6 +36,7 @@
#define NS_COMMAND_RELOAD "reload"
#define NS_COMMAND_RECONFIG "reconfig"
#define NS_COMMAND_REFRESH "refresh"
#define NS_COMMAND_RETRANSFER "retransfer"
#define NS_COMMAND_DUMPSTATS "stats"
#define NS_COMMAND_QUERYLOG "querylog"
#define NS_COMMAND_DUMPDB "dumpdb"
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: server.h,v 1.60 2001/09/04 19:29:24 gson Exp $ */
/* $Id: server.h,v 1.61 2001/09/15 14:23:26 marka Exp $ */
#ifndef NAMED_SERVER_H
#define NAMED_SERVER_H 1
......@@ -134,6 +134,12 @@ ns_server_refreshcommand(ns_server_t *server, char *args);
* Act on a "refresh" command from the command channel.
*/
isc_result_t
ns_server_retransfercommand(ns_server_t *server, char *args);
/*
* Act on a "retransfer" command from the command channel.
*/
isc_result_t
ns_server_togglequerylog(ns_server_t *server);
/*
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: server.c,v 1.342 2001/09/07 00:36:54 marka Exp $ */
/* $Id: server.c,v 1.343 2001/09/15 14:23:23 marka Exp $ */
#include <config.h>
......@@ -2565,6 +2565,29 @@ zone_from_args(ns_server_t *server, char *args, dns_zone_t **zonep) {
return (result);
}
/*
* Act on a "retransfer" command from the command channel.
*/
isc_result_t
ns_server_retransfercommand(ns_server_t *server, char *args) {
isc_result_t result;
dns_zone_t *zone = NULL;
dns_zonetype_t type;
result = zone_from_args(server, args, &zone);
if (result != ISC_R_SUCCESS)
return (result);
if (zone == NULL)
return (ISC_R_UNEXPECTEDEND);
type = dns_zone_gettype(zone);
if (type == dns_zone_slave || type == dns_zone_stub)
dns_zone_forcereload(zone);
else
result = ISC_R_NOTFOUND;
dns_zone_detach(&zone);
return (result);
}
/*
* Act on a "reload" command from the command channel.
*/
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rndc.c,v 1.78 2001/09/06 23:14:38 gson Exp $ */
/* $Id: rndc.c,v 1.79 2001/09/15 14:23:27 marka Exp $ */
/*
* Principal Author: DCL
......@@ -97,6 +97,8 @@ command is one of the following:\n\
Reload a single zone.\n\
refresh zone [class [view]]\n\
Schedule immediate maintenance for a zone.\n\
retransfer zone [class [view]]\n\
Retransfer a single zone without checking serial number.\n\
reconfig Reload configuration file and new zones only.\n\
stats Write server statistics to the statistics file.\n\
querylog Toggle query logging.\n\
......
......@@ -2,7 +2,7 @@
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd">
<!-- File: $Id: Bv9ARM-book.xml,v 1.158 2001/09/08 00:45:49 gson Exp $ -->
<!-- File: $Id: Bv9ARM-book.xml,v 1.159 2001/09/15 14:23:29 marka Exp $ -->
<book>
<title>BIND 9 Administrator Reference Manual</title>
......@@ -750,6 +750,12 @@ of a server.</para>
<listitem><para>Schedule zone maintenance for the given zone.</para></listitem>
</varlistentry>
<varlistentry><term><userinput>retransfer <replaceable>zone</replaceable>
<optional><replaceable>class</replaceable>
<optional><replaceable>view</replaceable></optional></optional></userinput></term>
<listitem><para>Retransfer the given zone from the master.</para></listitem>
</varlistentry>
<varlistentry><term><userinput>reconfig</userinput></term>
<listitem><para>Reload the configuration file and load new zones,
but do not reload existing zone files even if they have changed.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment