From 00ee3b5aea27bc10b3ad6b732dd582b65c74c795 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Thu, 1 Jan 2015 07:18:11 -0600 Subject: [PATCH 06/13] allow overriding default user and file locations Allow the build process to override the default ntpd file paths and default user. --- src/usr.sbin/ntpd/ntpd.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/usr.sbin/ntpd/ntpd.h b/src/usr.sbin/ntpd/ntpd.h index d438a6576d..0f7313c78e 100644 --- a/src/usr.sbin/ntpd/ntpd.h +++ b/src/usr.sbin/ntpd/ntpd.h @@ -35,10 +35,20 @@ #define MAXIMUM(a, b) ((a) > (b) ? (a) : (b)) +#ifndef NTPD_USER #define NTPD_USER "_ntp" -#define CONFFILE "/etc/ntpd.conf" -#define DRIFTFILE "/var/db/ntpd.drift" -#define CTLSOCKET "/var/run/ntpd.sock" +#endif + +#ifndef SYSCONFDIR +#define SYSCONFDIR "/etc" +#endif +#define CONFFILE SYSCONFDIR "/ntpd.conf" + +#ifndef LOCALSTATEDIR +#define LOCALSTATEDIR "/var" +#endif +#define DRIFTFILE LOCALSTATEDIR "/db/ntpd.drift" +#define CTLSOCKET LOCALSTATEDIR "/run/ntpd.sock" #if defined(SO_SETFIB) #define SO_RTABLE SO_SETFIB -- 2.20.1