[systemd-devel] [PATCH] Unify location of system-wide ntp-units.d
Dave Reisner
dreisner at archlinux.org
Mon Aug 20 13:43:48 PDT 2012
Ensure that this honors the build time rootprefix in the code, and that
the correct directory is created by the install target for timedated.
---
I'm making an assumption here that this is the "correct" solution, though I'm
not entirely convinced. Currently, /usr/lib/ntp-units.d is created by the
install target, but the code looks for /usr/lib/systemd/ntp-units.d. This is a
departure from other systemd-specific config directories like modules-load.d
and sysctl.d which reside in /usr/lib.
Since the code change is a little more "drastic", I've opted to just fix the
directory creation. Feel free to disagree.
Makefile.am | 2 +-
src/timedate/timedated.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 3eeb842..7bf80d7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3021,7 +3021,7 @@ dbusinterface_DATA += \
timedated-install-data-hook:
$(MKDIR_P) -m 0755 \
- $(DESTDIR)$(prefix)/lib/ntp-units.d \
+ $(DESTDIR)$(rootlibexecdir)/ntp-units.d \
$(DESTDIR)$(sysconfdir)/ntp-units.d
( cd $(DESTDIR)$(systemunitdir) && \
rm -f dbus-org.freedesktop.timedate1.service && \
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index 09fd808..a70202b 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -310,7 +310,7 @@ static char** get_ntp_services(void) {
"/etc/systemd/ntp-units.d",
"/run/systemd/ntp-units.d",
"/usr/local/lib/systemd/ntp-units.d",
- "/usr/lib/systemd/ntp-units.d",
+ ROOTPREFIX "/lib/systemd/ntp-units.d",
NULL);
if (k < 0)
return NULL;
--
1.7.11.5
More information about the systemd-devel
mailing list