Mercurial > dovecot > core-2.2
changeset 10956:a3c7f7021d87 HEAD
doveconf: Added -x parameter to expand $variables and <file in output.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 19 Mar 2010 20:40:23 +0200 |
parents | 513c43179ca9 |
children | 5798fdd4ad70 |
files | src/config/doveconf.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/config/doveconf.c Fri Mar 19 20:39:45 2010 +0200 +++ b/src/config/doveconf.c Fri Mar 19 20:40:23 2010 +0200 @@ -465,12 +465,12 @@ const char *error; char **exec_args = NULL; int c, ret, ret2; - bool config_path_specified; + bool config_path_specified, expand_vars = FALSE; memset(&filter, 0, sizeof(filter)); master_service = master_service_init("config", MASTER_SERVICE_FLAG_STANDALONE, - &argc, &argv, "af:m:nNe"); + &argc, &argv, "af:m:nNex"); orig_config_path = master_service_get_config_path(master_service); i_set_failure_prefix("doveconf: "); @@ -492,6 +492,9 @@ case 'N': scope = CONFIG_DUMP_SCOPE_SET; break; + case 'x': + expand_vars = TRUE; + break; default: return FATAL_DEFAULT; } @@ -514,7 +517,7 @@ master_service_init_finish(master_service); config_parse_load_modules(); - if ((ret = config_parse_file(config_path, FALSE, &error)) == 0 && + if ((ret = config_parse_file(config_path, expand_vars, &error)) == 0 && access(EXAMPLE_CONFIG_DIR, X_OK) == 0) { i_fatal("%s (copy example configs from "EXAMPLE_CONFIG_DIR"/)", error);