]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Read chrony.conf before checking/writing pid file
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 20 May 2010 14:10:51 +0000 (16:10 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 20 May 2010 14:10:51 +0000 (16:10 +0200)
This fixes the pidfile directive.

main.c

diff --git a/main.c b/main.c
index 7da6250b2c7debab3e5a7810cbb2107cb8469998..936850899fa0c92c2eab723efcb6785af470057a 100644 (file)
--- a/main.c
+++ b/main.c
@@ -261,6 +261,8 @@ int main
     }
   }
 
+  CNF_ReadFile(conf_file);
+
 #ifndef SYS_WINNT
   if (getuid() != 0) {
     /* This write to the terminal is OK, it comes before we turn into a daemon */
@@ -288,8 +290,6 @@ int main
   write_lockfile();
 #endif
 
-  CNF_ReadFile(conf_file);
-
   if (do_init_rtc) {
     RTC_TimePreInit();
   }