From 2ba73a35c4907336858320b31ce515a6aa10698f Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 21 Dec 2016 08:46:44 -0600 Subject: ntp.drift must be in a directory writable by ntp --- recipes-support/ntp/ntp_4.2.6p5.bbappend | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'recipes-support/ntp/ntp_4.2.6p5.bbappend') diff --git a/recipes-support/ntp/ntp_4.2.6p5.bbappend b/recipes-support/ntp/ntp_4.2.6p5.bbappend index 9c6419e..4651611 100644 --- a/recipes-support/ntp/ntp_4.2.6p5.bbappend +++ b/recipes-support/ntp/ntp_4.2.6p5.bbappend @@ -9,14 +9,18 @@ python do_patch_prepend () { import os } pkg_postinst_${PN} () { - touch /etc/ntp.drift - chown ntp:ntp /etc/ntp.drift - chmod 664 /etc/ntp.drift if ! [[ -d /var/log/ntpstats ]] ; then mkdir -p /var/log/ntpstats fi - chown ntp:ntp /var/log/ntpstats chmod 775 /var/log/ntpstats + + if ! [[ -d /var/lib/ntp ]] ; then + mkdir -p /var/lib/ntp + fi + drfile="/var/lib/ntp/ntp.drift" + touch ${drfile} + chown ntp:ntp ${drfile} + chmod 664 ${drfile} } -- cgit v1.2.3