summaryrefslogtreecommitdiff
path: root/recipes-support/ntp
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-support/ntp')
-rw-r--r--recipes-support/ntp/ntp_4.2.6p5.bbappend18
1 files changed, 10 insertions, 8 deletions
diff --git a/recipes-support/ntp/ntp_4.2.6p5.bbappend b/recipes-support/ntp/ntp_4.2.6p5.bbappend
index 4651611..7928608 100644
--- a/recipes-support/ntp/ntp_4.2.6p5.bbappend
+++ b/recipes-support/ntp/ntp_4.2.6p5.bbappend
@@ -9,18 +9,20 @@ python do_patch_prepend () {
import os
}
pkg_postinst_${PN} () {
- if ! [[ -d /var/log/ntpstats ]] ; then
- mkdir -p /var/log/ntpstats
+ sdir=/var/log/ntpstats
+ if ! [[ -d ${sdir} ]] ; then
+ mkdir -p ${sdir}
fi
- chown ntp:ntp /var/log/ntpstats
- chmod 775 /var/log/ntpstats
+ chown ntp:ntp ${sdir}
+ chmod 775 ${sdir}
- if ! [[ -d /var/lib/ntp ]] ; then
- mkdir -p /var/lib/ntp
+ drdir=/var/lib/ntp
+ if ! [[ -d ${drdir} ]] ; then
+ mkdir -p ${drdir}
fi
- drfile="/var/lib/ntp/ntp.drift"
+ drfile="${drdir}/ntp.drift"
touch ${drfile}
- chown ntp:ntp ${drfile}
chmod 664 ${drfile}
+ chown -R ntp:ntp ${drdir}
}