Read chrony.conf before checking/writing pid file

This fixes the pidfile directive.
This commit is contained in:
Miroslav Lichvar 2010-05-20 16:10:51 +02:00
parent a080d00352
commit 9775f3a030

4
main.c
View file

@ -261,6 +261,8 @@ int main
} }
} }
CNF_ReadFile(conf_file);
#ifndef SYS_WINNT #ifndef SYS_WINNT
if (getuid() != 0) { if (getuid() != 0) {
/* This write to the terminal is OK, it comes before we turn into a daemon */ /* This write to the terminal is OK, it comes before we turn into a daemon */
@ -288,8 +290,6 @@ int main
write_lockfile(); write_lockfile();
#endif #endif
CNF_ReadFile(conf_file);
if (do_init_rtc) { if (do_init_rtc) {
RTC_TimePreInit(); RTC_TimePreInit();
} }