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
10 years ago
10 years ago
10 years ago
  1. From 7ad3fc7eef6695250b03c931d41975f54674e0d9 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 07/10] 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 28ab1ba..cfbd603 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. 1.9.1