increase dvbapp PR.
[vuplus_openembedded] / recipes / ntp / ntp_4.1.2.bb
1 require ntp.inc
2
3 PR = "r5"
4
5 SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.1/ntp-${PV}.tar.gz \
6            file://configure.patch;patch=1 \
7            file://readline.patch;patch=1 \
8            file://ntpdate \
9            file://ntp"
10
11 do_install_append() {
12         install -d ${D}${sysconfdir}/init.d
13         install -m 755 ${WORKDIR}/ntpdate ${D}${sysconfdir}/init.d
14         install -m 755 ${WORKDIR}/ntp ${D}${sysconfdir}/init.d
15         echo "server pool.ntp.org" >${D}${sysconfdir}/ntp.conf
16 }
17
18 pkg_postinst_ntpdate() {
19 if test "x$D" != "x"; then
20         exit 1
21 else
22         if ! grep -q ntpdate /etc/cron/crontabs/root >/dev/null 2>&1; then
23                 echo "adding crontab"
24                 test -d /etc/cron/crontabs || mkdir -p /etc/cron/crontabs
25                 echo "30 * * * *    ${bindir}/ntpdate -s -u pool.ntp.org" >> /etc/cron/crontabs/root
26         fi
27
28         # Dunno why this is here, ask the "nylon" guys :)
29         test -x /etc/init.d/busybox-cron && update-rc.d -s busybox-cron defaults
30
31         update-rc.d -s ntpdate defaults 30
32 fi
33 }
34
35 pkg_postrm_ntpdate() {
36         update-rc.d -f ntpdate remove
37 }
38
39 pkg_postinst_ntp() {
40         update-rc.d -s ntp defaults 31
41 }
42
43 pkg_postrm_ntp(){
44         update-rc.d -f ntp remove
45 }
46