summaryrefslogtreecommitdiff
path: root/recipes-support/ntp/ntp_4.2.6p5.bbappend
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-support/ntp/ntp_4.2.6p5.bbappend')
-rw-r--r--recipes-support/ntp/ntp_4.2.6p5.bbappend25
1 files changed, 7 insertions, 18 deletions
diff --git a/recipes-support/ntp/ntp_4.2.6p5.bbappend b/recipes-support/ntp/ntp_4.2.6p5.bbappend
index a72f7bd..8460fda 100644
--- a/recipes-support/ntp/ntp_4.2.6p5.bbappend
+++ b/recipes-support/ntp/ntp_4.2.6p5.bbappend
@@ -10,29 +10,18 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files"
python do_patch_prepend () {
import os
}
-pkg_postinst_${PN} () {
- sdir=/var/log/ntpstats
- if ! [[ -d ${sdir} ]] ; then
- mkdir -p ${sdir}
- fi
- chown ntp:ntp ${sdir}
- chmod 775 ${sdir}
- drdir=/var/lib/ntp
- if ! [[ -d ${drdir} ]] ; then
- mkdir -p ${drdir}
- fi
+do_install_append() {
+ install -d ${D}${sysconfdir}/default
+ install -m 0644 ${WORKDIR}/ntpd-default ${D}${sysconfdir}/default/ntpd.default
+
+ drdir=${D}${localstatedir}/lib/ntp
+ install -d -m 0755 -p ${drdir}
drfile="${drdir}/ntp.drift"
touch ${drfile}
chmod 664 ${drfile}
chown -R ntp:ntp ${drdir}
}
-
-
-do_install_prepend() {
- install -d ${D}${sysconfdir}/default
- install -m 0644 ${WORKDIR}/ntpd-default ${D}${sysconfdir}/default/ntpd.default
-}
pkg_postinst_${PN}_append() {
update-alternatives --install ${sysconfdir}/default/ntpd ntpd-defaults ${sysconfdir}/default/ntpd.default 10
}
@@ -40,5 +29,5 @@ pkg_postinst_${PN}_append() {
pkg_postrm_${PN}_append() {
update-alternatives --remove ntpd-defaults ${sysconfdir}/default/ntpd.default
}
-FILES_${PN} += "${sysconfdir}/default/ntpd.default"
+FILES_${PN} += "${sysconfdir}/default/ntpd.default ${localstatedir}/lib/*"
CONFFILES_${PN} += "${sysconfdir}/default/ntpd.default"