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.2 KiB

4 years ago
6 years ago
4 years ago
4 years ago
  1. From 0bc7191cc87150509875af90298ca763df64a762 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 06/18] 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 208d19ccdf..b360af9eac 100644
  12. --- a/src/usr.sbin/ntpd/ntpd.h
  13. +++ b/src/usr.sbin/ntpd/ntpd.h
  14. @@ -36,10 +36,20 @@
  15. #define MAXIMUM(a, b) ((a) > (b) ? (a) : (b))
  16. +#ifndef NTPD_USER
  17. #define NTPD_USER "_ntp"
  18. -#define CONFFILE "/etc/ntpd.conf"
  19. -#define DRIFTFILE "/var/db/ntpd.drift"
  20. -#define CTLSOCKET "/var/run/ntpd.sock"
  21. +#endif
  22. +
  23. +#ifndef SYSCONFDIR
  24. +#define SYSCONFDIR "/etc"
  25. +#endif
  26. +#define CONFFILE SYSCONFDIR "/ntpd.conf"
  27. +
  28. +#ifndef LOCALSTATEDIR
  29. +#define LOCALSTATEDIR "/var"
  30. +#endif
  31. +#define DRIFTFILE LOCALSTATEDIR "/db/ntpd.drift"
  32. +#define CTLSOCKET LOCALSTATEDIR "/run/ntpd.sock"
  33. #define INTERVAL_QUERY_NORMAL 30 /* sync to peers every n secs */
  34. #define INTERVAL_QUERY_PATHETIC 60
  35. --
  36. 2.27.0