From: Miroslav Lichvar Date: Fri, 4 Dec 2009 11:30:30 +0000 (+0100) Subject: Set default chrony.conf path according to sysconfdir X-Git-Tag: 1.24-pre1~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1f6e508a3d125591b8e4653370add290d118b59f;p=thirdparty%2Fchrony.git Set default chrony.conf path according to sysconfdir --- diff --git a/Makefile.in b/Makefile.in index 7bec521a..23a83fee 100644 --- a/Makefile.in +++ b/Makefile.in @@ -25,6 +25,7 @@ # # Makefile template +SYSCONFDIR=@SYSCONFDIR@ BINDIR=@BINDIR@ SBINDIR=@SBINDIR@ MANDIR=@MANDIR@ @@ -76,6 +77,9 @@ chronyd : $(OBJS) $(EXTRA_OBJS) chronyc : $(CLI_OBJS) $(CC) $(OPTFLAGS) -o chronyc $(CLI_OBJS) $(LDFLAGS) @READLINE_LINK@ $(LIBS) $(EXTRA_CLI_LIBS) +conf.o : conf.c + $(CC) $(CFLAGS) $(CPPFLAGS) -DDEFAULT_CONF_DIR=\"$(SYSCONFDIR)\" -c $< + client.o : client.c $(CC) $(CFLAGS) $(CPPFLAGS) @READLINE_COMPILE@ -c $< diff --git a/conf.c b/conf.c index 1c1b4f0f..04cdab9f 100644 --- a/conf.c +++ b/conf.c @@ -58,7 +58,11 @@ /* ================================================== */ -#define DEFAULT_CONF_FILE "/etc/chrony.conf" +#ifndef DEFAULT_CONF_DIR +#define DEFAULT_CONF_DIR "/etc" +#endif + +#define DEFAULT_CONF_FILE DEFAULT_CONF_DIR"/chrony.conf" /* ================================================== */ /* Forward prototypes */