Reset timezone information on reconfigure
authorHannes Reinecke <hare@suse.de>
Fri, 13 Dec 2013 12:12:44 +0000 (13:12 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Fri, 13 Dec 2013 21:42:26 +0000 (22:42 +0100)
Whenever 'reconfigure' is called we need to re-initialize the
timezone information as it might have been changed in the
meantime.

References: bnc#830511

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath/log.c
multipathd/main.c

index 37c7cd7..74702d8 100644 (file)
@@ -99,6 +99,7 @@ void log_close (void)
 void log_reset (char *program_name)
 {
        closelog();
 void log_reset (char *program_name)
 {
        closelog();
+       tzset();
        openlog(program_name, 0, LOG_DAEMON);
 }
 
        openlog(program_name, 0, LOG_DAEMON);
 }
 
index a3547c5..6872e6f 100644 (file)
@@ -1436,6 +1436,9 @@ reconfigure (struct vectors * vecs)
        vecs->pathvec = NULL;
        conf = NULL;
 
        vecs->pathvec = NULL;
        conf = NULL;
 
+       /* Re-read any timezone changes */
+       tzset();
+
        if (!load_config(DEFAULT_CONFIGFILE, udev)) {
                conf->verbosity = old->verbosity;
                conf->daemon = 1;
        if (!load_config(DEFAULT_CONFIGFILE, udev)) {
                conf->verbosity = old->verbosity;
                conf->daemon = 1;