PR .= ".mlinux2" SRC_URI += " file://ntpd-init.patch;patchdir=.. \ file://ntp.conf.patch;patchdir=.. \ file://ntpd-default \ file://logtime.patch \ " FILESEXTRAPATHS_prepend := "${THISDIR}/files" python do_patch_prepend () { import os } pkg_postinst_${PN} () { sdir=/var/log/ntpstats if ! [[ -d ${sdir} ]] ; then mkdir -p ${sdir} fi chown ntp:ntp ${sdir} chmod 775 ${sdir} drdir=/var/lib/ntp if ! [[ -d ${drdir} ]] ; then mkdir -p ${drdir} fi drfile="${drdir}/ntp.drift" touch ${drfile} chmod 664 ${drfile} chown -R ntp:ntp ${drdir} } do_install_prepend() { install -d ${D}${sysconfdir}/default install -m 0644 ${WORKDIR}/ntpd-default ${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" CONFFILES_${PN} += "${sysconfdir}/default/ntpd.default"