The "cachefile" option now loads the file on startup. The "temporary" -x

option to named is no more.
This commit is contained in:
Brian Wellington 2000-12-12 23:05:59 +00:00
parent 8b6293c6ca
commit 58082ab8a8
5 changed files with 12 additions and 25 deletions

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: globals.h,v 1.50 2000/11/14 23:59:21 tale Exp $ */
/* $Id: globals.h,v 1.51 2000/12/12 23:05:57 bwelling Exp $ */
#ifndef NAMED_GLOBALS_H
#define NAMED_GLOBALS_H 1
@ -103,11 +103,6 @@ EXTERN const char * lwresd_g_defaultpidfile INIT(NS_LOCALSTATEDIR
"/run/lwresd.pid");
EXTERN const char * ns_g_username INIT(NULL);
/*
* XXX Temporary.
*/
EXTERN const char * ns_g_cachefile INIT(NULL);
#undef EXTERN
#undef INIT

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: main.c,v 1.96 2000/12/06 01:04:45 bwelling Exp $ */
/* $Id: main.c,v 1.97 2000/12/12 23:05:54 bwelling Exp $ */
#include <config.h>
@ -346,10 +346,6 @@ parse_command_line(int argc, char *argv[]) {
case 'v':
printf("BIND %s\n", ns_g_version);
exit(0);
case 'x':
/* XXXRTH temporary syntax */
ns_g_cachefile = isc_commandline_argument;
break;
case '?':
usage();
ns_main_earlyfatal("unknown option '-%c'",

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: server.c,v 1.271 2000/12/12 21:33:10 bwelling Exp $ */
/* $Id: server.c,v 1.272 2000/12/12 23:05:56 bwelling Exp $ */
#include <config.h>
@ -495,17 +495,6 @@ configure_view(dns_view_t *view, dns_c_ctx_t *cctx, dns_c_view_t *cview,
dns_cache_detach(&cache);
/*
* XXXRTH Temporary support for loading cache contents.
*/
if (ns_g_cachefile != NULL) {
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_SERVER, ISC_LOG_DEBUG(1),
"loading cache '%s'", ns_g_cachefile);
/* DNS_R_SEENINCLUDE should be impossible here. */
CHECK(dns_db_load(view->cachedb, ns_g_cachefile));
}
/*
* Resolver.
*
@ -731,6 +720,13 @@ configure_view(dns_view_t *view, dns_c_ctx_t *cctx, dns_c_view_t *cview,
if (view->cachefile != NULL)
isc_mem_free(view->mctx, view->cachefile);
view->cachefile = p;
if (view->cachefile != NULL) {
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_SERVER, ISC_LOG_DEBUG(1),
"loading cache '%s'", view->cachefile);
/* DNS_R_SEENINCLUDE should be impossible here. */
CHECK(dns_db_load(view->cachedb, view->cachefile));
}
}
result = ISC_R_SUCCESS;

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named.conf,v 1.6 2000/11/28 19:06:26 gson Exp $ */
/* $Id: named.conf,v 1.7 2000/12/12 23:05:58 bwelling Exp $ */
options {
query-source address 10.53.0.1;
@ -27,6 +27,7 @@ options {
listen-on-v6 { none; };
recursion no;
notify no;
cache-file "cache";
};
zone "." {

View file

@ -1 +0,0 @@
-x cache