diff options
author | Peter Bigot <pab@pabigot.com> | 2014-10-12 16:23:49 -0500 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-10-14 11:48:58 +0200 |
commit | 657b3642c43192d94fcdcbc7bf11fafa111fa83c (patch) | |
tree | ead6db014d03eabff465957380a16bc4b2f8b896 | |
parent | fd1c5b8dc5c9f412036f0356cc2036803d0a41c1 (diff) | |
download | meta-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>
-rw-r--r-- | meta-networking/recipes-support/ntp/ntp.inc | 8 |
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 | |||
36 | CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED" | 36 | CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED" |
37 | 37 | ||
38 | USERADD_PACKAGES = "${PN}" | 38 | USERADD_PACKAGES = "${PN}" |
39 | USERADD_PARAM_${PN} = "--system --home-dir /var/lib/ntp \ | 39 | NTP_USER_HOME ?= "/var/lib/ntp" |
40 | USERADD_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" | |||
111 | RSUGGESTS_${PN} = "iana-etc" | 116 | RSUGGESTS_${PN} = "iana-etc" |
112 | 117 | ||
113 | FILES_${PN} = "${sbindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${libdir} \ | 118 | FILES_${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 | " |
116 | FILES_${PN}-tickadj = "${sbindir}/tickadj" | 122 | FILES_${PN}-tickadj = "${sbindir}/tickadj" |