diff options
Diffstat (limited to 'meta-networking/recipes-support/ntp/ntp_4.2.6p3.bb')
| -rw-r--r-- | meta-networking/recipes-support/ntp/ntp_4.2.6p3.bb | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/ntp/ntp_4.2.6p3.bb b/meta-networking/recipes-support/ntp/ntp_4.2.6p3.bb new file mode 100644 index 0000000000..89a272a361 --- /dev/null +++ b/meta-networking/recipes-support/ntp/ntp_4.2.6p3.bb | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | require ntp.inc | ||
| 2 | |||
| 3 | PR = "r6" | ||
| 4 | |||
| 5 | SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \ | ||
| 6 | file://tickadj.c.patch \ | ||
| 7 | file://ntp-4.2.4_p6-nano.patch \ | ||
| 8 | file://ntpd \ | ||
| 9 | file://ntp.conf \ | ||
| 10 | file://ntpdate \ | ||
| 11 | " | ||
| 12 | |||
| 13 | SRC_URI[md5sum] = "59876a9009b098ff59767ee45a88ebd2" | ||
| 14 | SRC_URI[sha256sum] = "6e84d4ddfa14b911c3ed88463af10867e1fa9b287e7b34d8a02e78be85a7c40e" | ||
| 15 | |||
| 16 | EXTRA_OECONF += " --with-net-snmp-config=no --without-ntpsnmpd" | ||
| 17 | |||
| 18 | do_install_append() { | ||
| 19 | install -d ${D}/${sysconfdir}/init.d | ||
| 20 | install -m 644 ${WORKDIR}/ntp.conf ${D}/${sysconfdir} | ||
| 21 | install -m 755 ${WORKDIR}/ntpd ${D}/${sysconfdir}/init.d | ||
| 22 | install -d ${D}/${sysconfdir}/network/if-up.d | ||
| 23 | install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d | ||
| 24 | } | ||
| 25 | |||
| 26 | FILES_${PN}-bin = "${bindir}/ntp-wait ${bindir}/ntpdc ${bindir}/ntpq ${bindir}/ntptime ${bindir}/ntptrace" | ||
| 27 | FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd" | ||
| 28 | FILES_${PN}-tickadj = "${bindir}/tickadj" | ||
| 29 | FILES_ntp-utils = "${bindir}/*" | ||
| 30 | FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/network/if-up.d/ntpdate" | ||
| 31 | |||
| 32 | # ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms | ||
| 33 | # with wonky clocks (e.g. OpenSlug) | ||
| 34 | RDEPENDS_${PN} = "${PN}-tickadj" | ||
| 35 | |||
| 36 | pkg_postinst_ntpdate() { | ||
| 37 | if test "x$D" != "x"; then | ||
| 38 | exit 1 | ||
| 39 | else | ||
| 40 | if ! grep -q -s ntpdate /var/spool/cron/root; then | ||
| 41 | echo "adding crontab" | ||
| 42 | test -d /var/spool/cron || mkdir -p /var/spool/cron | ||
| 43 | echo "30 * * * * /usr/bin/ntpdate -b -s -u pool.ntp.org" >> /var/spool/cron/root | ||
| 44 | fi | ||
| 45 | fi | ||
| 46 | } | ||
| 47 | |||
