From 9e2736be4c621df44b92d1af615d32bb81cfea6d Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Tue, 17 Mar 2015 18:41:17 +0900 Subject: [PATCH] Remove superfluous configuration check Also add note about configuration parsing failure and event logging. --- repmgrd.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/repmgrd.c b/repmgrd.c index ef08196d..6d7c2225 100644 --- a/repmgrd.c +++ b/repmgrd.c @@ -201,17 +201,16 @@ main(int argc, char **argv) } /* - * Read the configuration file: repmgr.conf + * Parse the configuration file, if provided. If no configuration file + * was provided, or one was but was incomplete, parse_config() will + * abort anyway, with an appropriate message. + * + * XXX it might be desirable to create an event record for this, in + * which case we'll need to refactor parse_config() not to abort, + * and return the error message. */ parse_config(config_file, &local_options); - if (local_options.node == -1) - { - log_err(_("Node information is missing. " - "Check the configuration file, or provide one if you have not done so.\n")); - terminate(ERR_BAD_CONFIG); - } - if (daemonize) { do_daemonize(); @@ -1940,7 +1939,7 @@ terminate(int retval) unlink(pid_file); } - log_info("Terminating...\n"); + log_info(_("%s terminating...\n"), progname); exit(retval); }