blob: 436164a99e46bd6755e96566827f5763ad42e04f (
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
27
28
29
30
31
32
33
34
35
36
37
|
PR .= ".mlinux6"
SRC_URI += " file://ntpd-default \
file://ntp.conf.patch;patchdir=.. \
file://ntpd-init.patch;patchdir=.. \
file://logtime.patch \
"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
RDEPENDS_${PN} += "bash"
python do_patch_prepend () {
import os
}
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}
tmp=$(sha256sum ${D}${sysconfdir}/ntp.conf | sed 's/ .*//')
echo "CONFIGFILE_sha256=${tmp}" >> ${D}${sysconfdir}/default/ntpd.default
}
pkg_postinst_${PN}_append() {
update-alternatives --install ${sysconfdir}/default/ntpd ntpd-defaults ${sysconfdir}/default/ntpd.default 10
}
pkg_postrm_${PN}_append() {
update-alternatives --remove ntpd-defaults ${sysconfdir}/default/ntpd.default
}
FILES_${PN} += "${sysconfdir}/default/ntpd.default ${localstatedir}/lib/*"
CONFFILES_${PN} += "${sysconfdir}/default/ntpd.default"
|