summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/ntp
diff options
context:
space:
mode:
authorPeter Bigot <pab@pabigot.com>2014-10-12 16:23:49 -0500
committerMartin Jansa <Martin.Jansa@gmail.com>2014-10-14 11:48:58 +0200
commit657b3642c43192d94fcdcbc7bf11fafa111fa83c (patch)
treeead6db014d03eabff465957380a16bc4b2f8b896 /meta-networking/recipes-support/ntp
parentfd1c5b8dc5c9f412036f0356cc2036803d0a41c1 (diff)
downloadmeta-openembedded-657b3642c43192d94fcdcbc7bf11fafa111fa83c.tar.gz
ntp: create and package ntp home directory
This allows the base recipe and bbappends to reference persistent mutable state such as a drift file. Signed-off-by: Peter A. Bigot <pab@pabigot.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-networking/recipes-support/ntp')
-rw-r--r--meta-networking/recipes-support/ntp/ntp.inc8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta-networking/recipes-support/ntp/ntp.inc b/meta-networking/recipes-support/ntp/ntp.inc
index f55a39a92..fd29a78cf 100644
--- a/meta-networking/recipes-support/ntp/ntp.inc
+++ b/meta-networking/recipes-support/ntp/ntp.inc
@@ -36,7 +36,9 @@ EXTRA_OECONF += "--with-net-snmp-config=no --without-ntpsnmpd ac_cv_header_readl
36CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED" 36CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED"
37 37
38USERADD_PACKAGES = "${PN}" 38USERADD_PACKAGES = "${PN}"
39USERADD_PARAM_${PN} = "--system --home-dir /var/lib/ntp \ 39NTP_USER_HOME ?= "/var/lib/ntp"
40USERADD_PARAM_${PN} = "--system --home-dir ${NTP_USER_HOME} \
41 --no-create-home \
40 --shell /bin/false --user-group ntp" 42 --shell /bin/false --user-group ntp"
41 43
42# NB: debug is default-enabled by NTP; keep it default-enabled here. 44# NB: debug is default-enabled by NTP; keep it default-enabled here.
@@ -57,6 +59,9 @@ do_install_append() {
57 install -d ${D}${bindir} 59 install -d ${D}${bindir}
58 install -m 755 ${WORKDIR}/ntpdate ${D}${bindir}/ntpdate-sync 60 install -m 755 ${WORKDIR}/ntpdate ${D}${bindir}/ntpdate-sync
59 61
62 install -m 755 -d ${D}${NTP_USER_HOME}
63 chown ntp:ntp ${D}${NTP_USER_HOME}
64
60 # Fix hardcoded paths in scripts 65 # Fix hardcoded paths in scripts
61 sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync 66 sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
62 sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync 67 sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
@@ -111,6 +116,7 @@ RCONFLICTS_ntpdate += "ntpdate-systemd"
111RSUGGESTS_${PN} = "iana-etc" 116RSUGGESTS_${PN} = "iana-etc"
112 117
113FILES_${PN} = "${sbindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${libdir} \ 118FILES_${PN} = "${sbindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${libdir} \
119 ${NTP_USER_HOME} \
114 ${systemd_unitdir}/ntp-units.d/60-ntpd.list \ 120 ${systemd_unitdir}/ntp-units.d/60-ntpd.list \
115" 121"
116FILES_${PN}-tickadj = "${sbindir}/tickadj" 122FILES_${PN}-tickadj = "${sbindir}/tickadj"