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