summaryrefslogtreecommitdiff
path: root/recipes-support/ntp/ntp_4.2.6p5.bbappend
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-support/ntp/ntp_4.2.6p5.bbappend')
-rw-r--r--recipes-support/ntp/ntp_4.2.6p5.bbappend18
1 files changed, 18 insertions, 0 deletions
diff --git a/recipes-support/ntp/ntp_4.2.6p5.bbappend b/recipes-support/ntp/ntp_4.2.6p5.bbappend
index 7928608..b656256 100644
--- a/recipes-support/ntp/ntp_4.2.6p5.bbappend
+++ b/recipes-support/ntp/ntp_4.2.6p5.bbappend
@@ -2,6 +2,7 @@ PR .= ".mlinux1"
SRC_URI += " file://ntpd-init.patch;patchdir=.. \
file://ntp.conf.patch;patchdir=.. \
+ file://ntpd-default \
"
FILESEXTRAPATHS_prepend := "${THISDIR}/files"
@@ -26,3 +27,20 @@ pkg_postinst_${PN} () {
chown -R ntp:ntp ${drdir}
}
+
+do_install_prepend() {
+ echo JAK In do_install_append in directory $(pwd), and D is ${D}
+ echo JAK In do_install_append sysconfdir is ${sysconfdir}
+ install -d ${D}${sysconfdir}/default
+ install -m 0644 ${WORKDIR}/ntpd-default ${D}${sysconfdir}/default/ntpd.default
+ echo JAK In do_install_append default is $(ls ${D}cd${sysconfdir}/default/ntpd.default)
+}
+pkg_postinst_${PN}() {
+ update-alternatives --install ${sysconfdir}/default/ntpd ntpd-defaults ${sysconfdir}/default/ntpd.default 10
+}
+
+pkg_postrm_${PN}() {
+ update-alternatives --remove ntpd-defaults ${sysconfdir}/default/ntpd.default
+}
+FILES_${PN} += "${sysconfdir}/default/ntpd.default"
+CONFFILES_${PN} += "${sysconfdir}/default/ntpd.default"