summaryrefslogtreecommitdiff
path: root/packages/ntp
diff options
context:
space:
mode:
authornslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net>2005-06-13 23:40:07 +0000
committernslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net>2005-06-13 23:40:07 +0000
commit631d48c531b706bfb3303708a0a010a6fc5198ef (patch)
tree69c43b9986f27d7403d3ece2a3bee17974affc90 /packages/ntp
parent0108a1778bebdd616ab8b187fdd30d01c22444be (diff)
Merge bk://oe-devel.bkbits.net/openembedded
into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/06/14 01:22:21+02:00 handhelds.org!CoreDump ntp: Unb0rk postinst for ntpdate and add initscript for ntpd. Fixing Bug #85 BKrev: 42ae1957t2uUftWKAVWn8H_NJIhHcw
Diffstat (limited to 'packages/ntp')
-rw-r--r--packages/ntp/files/ntp0
-rw-r--r--packages/ntp/ntp_4.1.2.bb29
2 files changed, 24 insertions, 5 deletions
diff --git a/packages/ntp/files/ntp b/packages/ntp/files/ntp
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/ntp/files/ntp
diff --git a/packages/ntp/ntp_4.1.2.bb b/packages/ntp/ntp_4.1.2.bb
index 47b30d8300..4af70599f0 100644
--- a/packages/ntp/ntp_4.1.2.bb
+++ b/packages/ntp/ntp_4.1.2.bb
@@ -6,12 +6,13 @@ HOMEPAGE = "http://ntp.isc.org/bin/view/Main/WebHome"
SECTION = "console/network"
PRIORITY = "optional"
LICENSE = "ntp"
-PR = "r3"
+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://ntpdate \
+ file://ntp"
inherit autotools
@@ -25,18 +26,36 @@ 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_nylon() {
+pkg_postinst_ntpdate() {
if test "x$D" != "x"; then
exit 1
else
- if ! grep -q ntpdate /etc/cron/crontabs/root; then
+ 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
- update-rc.d -s busybox-cron defaults
+
+ # 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
+}
+