blob: 4af70599f0f4cabbd812882b40f5c29a9b434ca0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
DESCRIPTION = "The Network Time Protocol (NTP) is used to \
synchronize the time of a computer client or server to \
another server or reference time source, such as a radio \
or satellite receiver or modem."
HOMEPAGE = "http://ntp.isc.org/bin/view/Main/WebHome"
SECTION = "console/network"
PRIORITY = "optional"
LICENSE = "ntp"
PR = "r4"
SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.1/ntp-${PV}.tar.gz \
file://configure.patch;patch=1 \
file://readline.patch;patch=1 \
file://ntpdate \
file://ntp"
inherit autotools
EXTRA_OECONF = "--without-openssl"
CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED"
PACKAGES =+ "ntpdate"
FILES_ntpdate = "${bindir}/ntpdate /etc/init.d/ntpdate"
do_install_append() {
install -d ${D}${sysconfdir}/init.d
install -m 755 ${WORKDIR}/ntpdate ${D}${sysconfdir}/init.d
install -m 755 ${WORKDIR}/ntp ${D}${sysconfdir}/init.d
echo "server pool.ntp.org" >${D}${sysconfdir}/ntp.conf
}
pkg_postinst_ntpdate() {
if test "x$D" != "x"; then
exit 1
else
if ! grep -q ntpdate /etc/cron/crontabs/root >/dev/null 2>&1; then
echo "adding crontab"
test -d /etc/cron/crontabs || mkdir -p /etc/cron/crontabs
echo "30 * * * * ${bindir}/ntpdate -s -u pool.ntp.org" >> /etc/cron/crontabs/root
fi
# Dunno why this is here, ask the "nylon" guys :)
test -x /etc/init.d/busybox-cron && update-rc.d -s busybox-cron defaults
update-rc.d -s ntpdate defaults 30
fi
}
pkg_postrm_ntpdate() {
update-rc.d -f ntpdate remove
}
pkg_postinst_ntp() {
update-rc.d -s ntp defaults 31
}
pkg_postrm_ntp(){
update-rc.d -f ntp remove
}
|