diff options
author | John Klug <john.klug@multitech.com> | 2016-12-21 12:18:39 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2016-12-21 12:18:39 -0600 |
commit | 0f6b23997881f6e683f425cb8529434248a50577 (patch) | |
tree | c06209b0cd8fc0c0bdfee4b7d9ea6b1a9a4999b5 /recipes-support/ntp/ntp_4.2.6p5.bbappend | |
parent | 0d53f1437fcdbae1c1b112b9892be8994cef3834 (diff) | |
download | meta-mlinux-0f6b23997881f6e683f425cb8529434248a50577.tar.gz meta-mlinux-0f6b23997881f6e683f425cb8529434248a50577.tar.bz2 meta-mlinux-0f6b23997881f6e683f425cb8529434248a50577.zip |
Fix up stats directory permissions.
Diffstat (limited to 'recipes-support/ntp/ntp_4.2.6p5.bbappend')
-rw-r--r-- | recipes-support/ntp/ntp_4.2.6p5.bbappend | 18 |
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} } |