Portable build framework for OpenNTPD
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.1 KiB

10 years ago
  1. From e76ff433a73cf9a6dc1f24db3500c5139e031601 Mon Sep 17 00:00:00 2001
  2. From: Brent Cook <busterb@gmail.com>
  3. Date: Thu, 1 Jan 2015 07:18:11 -0600
  4. Subject: [PATCH 15/16] allow overriding default user and file locations
  5. Allow the build process to override the default ntpd file paths and
  6. default user.
  7. ---
  8. src/usr.sbin/ntpd/ntpd.h | 16 +++++++++++++---
  9. 1 file changed, 13 insertions(+), 3 deletions(-)
  10. diff --git a/src/usr.sbin/ntpd/ntpd.h b/src/usr.sbin/ntpd/ntpd.h
  11. index 61a447f..efb0c61 100644
  12. --- a/src/usr.sbin/ntpd/ntpd.h
  13. +++ b/src/usr.sbin/ntpd/ntpd.h
  14. @@ -33,10 +33,20 @@
  15. #include "ntp.h"
  16. #include <imsg.h>
  17. +#ifndef NTPD_USER
  18. #define NTPD_USER "_ntp"
  19. -#define CONFFILE "/etc/ntpd.conf"
  20. -#define DRIFTFILE "/var/db/ntpd.drift"
  21. -#define CTLSOCKET "/var/run/ntpd.sock"
  22. +#endif
  23. +
  24. +#ifndef SYSCONFDIR
  25. +#define SYSCONFDIR "/etc"
  26. +#endif
  27. +#define CONFFILE SYSCONFDIR "/ntpd.conf"
  28. +
  29. +#ifndef LOCALSTATEDIR
  30. +#define LOCALSTATEDIR "/var"
  31. +#endif
  32. +#define DRIFTFILE LOCALSTATEDIR "/db/ntpd.drift"
  33. +#define CTLSOCKET LOCALSTATEDIR "/run/ntpd.sock"
  34. #define INTERVAL_QUERY_NORMAL 30 /* sync to peers every n secs */
  35. #define INTERVAL_QUERY_PATHETIC 60
  36. --
  37. 1.9.1