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

4 years ago
4 years ago
6 years ago
4 years ago
4 years ago
8 years ago
4 years ago
  1. From 2359f4e6bc17e2924739cf4af4e21335ddd8508a 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 05493ad1b2..98f235be94 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. #if defined(SO_SETFIB)
  34. #define SO_RTABLE SO_SETFIB
  35. --
  36. 2.27.0