diff --git a/README b/README index a1764a42b1..6b26376a09 100644 --- a/README +++ b/README @@ -204,6 +204,10 @@ Bug Reports and Mailing Lists -f Run in the foreground. + -g Run in the foreground and log + to stderr, ignoring any "logging" + statement in in the config file + -n -t Chroot to before running. diff --git a/bin/named/main.c b/bin/named/main.c index 0b602b8c87..8b624813cc 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -174,7 +174,7 @@ parse_command_line(int argc, char *argv[]) { isc_commandline_errprint = ISC_FALSE; while ((ch = isc_commandline_parse(argc, argv, - "c:d:fn:N:p:st:u:x:")) != + "c:d:fgn:N:p:st:u:x:")) != -1) { switch (ch) { case 'c': @@ -188,6 +188,10 @@ parse_command_line(int argc, char *argv[]) { ns_g_logstderr = ISC_TRUE; ns_g_foreground = ISC_TRUE; break; + case 'g': + ns_g_foreground = ISC_TRUE; + ns_g_logstderr = ISC_TRUE; + break; case 'N': /* Deprecated. */ case 'n': ns_g_cpus = atoi(isc_commandline_argument); diff --git a/bin/named/server.c b/bin/named/server.c index d8397ed6e0..eb5b5e70e6 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -933,7 +933,7 @@ load_configuration(const char *filename, ns_server_t *server, isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER, ISC_LOG_INFO, "ignoring named.conf logging statement " - "due to -ff option"); + "due to -g option"); } else { dns_c_logginglist_t *clog = NULL; isc_logconfig_t *logc = NULL;