From: Timo Sirainen Date: Wed, 6 Oct 2010 18:34:41 +0000 (+0100) Subject: doveconf: Added -p parameter to parse full config even if -m module is given. X-Git-Tag: 2.0.6~79 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fbef0c41a0f0a5a87127101f9dd66fdfbba4fd5a;p=thirdparty%2Fdovecot%2Fcore.git doveconf: Added -p parameter to parse full config even if -m module is given. --- diff --git a/src/config/doveconf.c b/src/config/doveconf.c index b8f2b9f18d..3bc7c82eb5 100644 --- a/src/config/doveconf.c +++ b/src/config/doveconf.c @@ -564,6 +564,7 @@ int main(int argc, char *argv[]) unsigned int i; int c, ret, ret2; bool config_path_specified, expand_vars = FALSE, hide_key = FALSE; + bool parse_full_config = FALSE; if (getenv("USE_SYSEXITS") != NULL) { /* we're coming from (e.g.) LDA */ @@ -573,7 +574,7 @@ int main(int argc, char *argv[]) memset(&filter, 0, sizeof(filter)); master_service = master_service_init("config", MASTER_SERVICE_FLAG_STANDALONE, - &argc, &argv, "af:hm:nNex"); + &argc, &argv, "af:hm:nNpex"); orig_config_path = master_service_get_config_path(master_service); i_set_failure_prefix("doveconf: "); @@ -600,6 +601,9 @@ int main(int argc, char *argv[]) case 'N': scope = CONFIG_DUMP_SCOPE_SET; break; + case 'p': + parse_full_config = TRUE; + break; case 'x': expand_vars = TRUE; break; @@ -629,7 +633,8 @@ int main(int argc, char *argv[]) config_parse_load_modules(); if ((ret = config_parse_file(config_path, expand_vars, - module, &error)) == 0 && + parse_full_config ? "" : module, + &error)) == 0 && access(EXAMPLE_CONFIG_DIR, X_OK) == 0) { i_fatal("%s (copy example configs from "EXAMPLE_CONFIG_DIR"/)", error);