dovecot-2.0: doveconf: Added -x parameter to expand $variables a...

dovecot at dovecot.org dovecot at dovecot.org
Fri Mar 19 20:40:28 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/a3c7f7021d87
changeset: 10956:a3c7f7021d87
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Mar 19 20:40:23 2010 +0200
description:
doveconf: Added -x parameter to expand $variables and <file in output.

diffstat:

 src/config/doveconf.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r 513c43179ca9 -r a3c7f7021d87 src/config/doveconf.c
--- 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);


More information about the dovecot-cvs mailing list