summaryrefslogtreecommitdiff
path: root/recipes-support/ntp/ntp_4.2.6p5.bbappend
blob: 4651611ceaa3433759c6b0596d7265f10f95f1be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
PR .= ".mlinux1"

SRC_URI += " file://ntpd-init.patch;patchdir=.. \
             file://ntp.conf.patch;patchdir=.. \
		"
FILESEXTRAPATHS_prepend := "${THISDIR}/files"

python do_patch_prepend () {
    import os
}
pkg_postinst_${PN} () {
    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}
}