dovecot-2.0: lib-master: Added -O parameter to use program defau...
dovecot at dovecot.org
dovecot at dovecot.org
Thu May 21 05:45:22 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/fa195866a79a
changeset: 9336:fa195866a79a
user: Timo Sirainen <tss at iki.fi>
date: Wed May 20 22:43:08 2009 -0400
description:
lib-master: Added -O parameter to use program default settings.
diffstat:
3 files changed, 6 insertions(+), 2 deletions(-)
src/lib-master/master-service-private.h | 1 +
src/lib-master/master-service-settings.c | 2 +-
src/lib-master/master-service.c | 5 ++++-
diffs (45 lines):
diff -r 6b06f4561fcb -r fa195866a79a src/lib-master/master-service-private.h
--- a/src/lib-master/master-service-private.h Wed May 20 17:53:03 2009 -0400
+++ b/src/lib-master/master-service-private.h Wed May 20 22:43:08 2009 -0400
@@ -44,6 +44,7 @@ struct master_service {
unsigned int keep_environment:1;
unsigned int log_directly:1;
unsigned int initial_status_sent:1;
+ unsigned int default_settings:1;
};
#endif
diff -r 6b06f4561fcb -r fa195866a79a src/lib-master/master-service-settings.c
--- a/src/lib-master/master-service-settings.c Wed May 20 17:53:03 2009 -0400
+++ b/src/lib-master/master-service-settings.c Wed May 20 22:43:08 2009 -0400
@@ -189,7 +189,7 @@ int master_service_settings_read(struct
unsigned int i;
int ret, fd = -1;
- if (getenv("DOVECONF_ENV") == NULL) {
+ if (getenv("DOVECONF_ENV") == NULL && !service->default_settings) {
fd = master_service_read_config(service, input, error_r);
if (fd == -1)
return -1;
diff -r 6b06f4561fcb -r fa195866a79a src/lib-master/master-service.c
--- a/src/lib-master/master-service.c Wed May 20 17:53:03 2009 -0400
+++ b/src/lib-master/master-service.c Wed May 20 22:43:08 2009 -0400
@@ -32,7 +32,7 @@ static void master_status_update(struct
const char *master_service_getopt_string(void)
{
- return "c:ko:s:L";
+ return "c:ko:Os:L";
}
static void sig_die(const siginfo_t *si, void *context)
@@ -190,6 +190,9 @@ bool master_service_parse_option(struct
if (!array_is_created(&service->config_overrides))
i_array_init(&service->config_overrides, 16);
array_append(&service->config_overrides, &arg, 1);
+ break;
+ case 'O':
+ service->default_settings = TRUE;
break;
case 's':
if ((i = atoi(arg)) < 0)
More information about the dovecot-cvs
mailing list