[oe-commits] org.oe.dev ntpclient: Add new recipe for ntpclient, courtesy of Colin Hill aka hillct. Closing bug #1894

coredump2 commit openembedded-commits at lists.openembedded.org
Sat Feb 24 21:34:20 UTC 2007


ntpclient: Add new recipe for ntpclient, courtesy of Colin Hill aka hillct. Closing bug #1894

Author: coredump2 at openembedded.org
Branch: org.openembedded.dev
Revision: 98da602bcff45ff99451436a7c447ed85b4cfbb7
ViewMTN: http://monotone.openembedded.org/revision.psp?id=98da602bcff45ff99451436a7c447ed85b4cfbb7
Files:
1
packages/ntpclient
packages/ntpclient/files
packages/ntpclient/files/init
packages/ntpclient/ntpclient_2003_194.bb
Diffs:

#
# mt diff -r3f9f00e151e15fbf83e33d6cec65b6ebccb1a4f8 -r98da602bcff45ff99451436a7c447ed85b4cfbb7
#
# 
# 
# add_dir "packages/ntpclient"
# 
# add_dir "packages/ntpclient/files"
# 
# add_file "packages/ntpclient/files/init"
#  content [5b948fd96b609b211a1663bcf0efd90a0311e251]
# 
# add_file "packages/ntpclient/ntpclient_2003_194.bb"
#  content [9e2f9a2c37ff013d24660758efd3028b05bdf2d9]
# 
============================================================
--- packages/ntpclient/files/init	5b948fd96b609b211a1663bcf0efd90a0311e251
+++ packages/ntpclient/files/init	5b948fd96b609b211a1663bcf0efd90a0311e251
@@ -0,0 +1,42 @@
+#! /bin/sh 
+#
+# This is an init script for openembedded
+# Copy it to /etc/init.d/ntpclient and type
+# > update-rc.d ntpclient defaults 60
+#
+ntpclient=/sbin/ntpclient
+test -x "$ntpclient" || exit 0
+# Seconds Between Time Checks
+ntpinterval=600
+# Upstream NTP Server Name
+ntpserver=pool.ntp.org
+
+case "$1" in
+  start)
+    echo -n "Starting NTP Client"
+    start-stop-daemon --start --quiet --background --make-pidfile --pidfile /var/run/ntpclient.pid --exec $ntpclient -- -l -i $ntpinterval -h $ntpserver
+    echo "."
+    ;;
+  stop)
+    echo -n "Stopping NTP Client"
+    start-stop-daemon --stop --quiet --pidfile /var/run/ntpclient.pid
+    echo "."
+    ;;
+  reload|force-reload)
+    start-stop-daemon --stop --quiet --signal 1 --exec $ntpclient
+    ;;
+  restart)
+    echo -n "Stopping NTP Client"
+    start-stop-daemon --stop --quiet --pidfile /var/run/ntpclient.pid
+    echo "."
+    sleep 1
+    echo -n "Starting NTP Client"
+    start-stop-daemon --start --quiet --background --make-pidfile --pidfile /var/run/ntpclient.pid --exec $ntpclient -- -l -i $ntpinterval -h $ntpserver
+    echo "."
+    ;;
+  *)
+    echo "Usage: /etc/init.d/ntpclient {start|stop|reload|restart|force-reload}"
+    exit 1
+esac
+
+exit 0
============================================================
--- packages/ntpclient/ntpclient_2003_194.bb	9e2f9a2c37ff013d24660758efd3028b05bdf2d9
+++ packages/ntpclient/ntpclient_2003_194.bb	9e2f9a2c37ff013d24660758efd3028b05bdf2d9
@@ -0,0 +1,32 @@
+DESCRIPTION = "NTP (RFC-1305) client for unix-alike computers"
+HOMEPAGE = "http://doolittle.icarus.com/ntpclient"
+AUTHOR = "Larry Doolittle <larry at doolittle.boa.org>"
+RDEPENDS = "busybox"
+SECTION = "admin"
+LICENSE = "GPL/v2"
+PR = "r0"
+# The ntpclient package uses version numbers that include an underscore :(
+PV = "2003_194"
+# ntpclient unpacks into a directory that doesn't include version info :(
+S = "${WORKDIR}/${PN}"
+
+SRC_URI = "http://doolittle.icarus.com/ntpclient/ntpclient_${PV}.tar.gz \
+           file://init"
+
+INITSCRIPT_NAME = "ntpclient"
+INITSCRIPT_PARAMS = "defaults 65"
+inherit update-rc.d
+
+do_compile() {
+    oe_runmake ntpclient
+    oe_runmake adjtimex
+}
+
+do_install () {
+    # Install the binary and tools
+    install -D -s -m 0755 ${S}/ntpclient ${D}${base_sbindir}/ntpclient
+    install -D -s -m 0755 ${S}/adjtimex ${D}${base_sbindir}/adjtimex
+    install -D -m 0755 ${S}/rate.awk ${D}${sbindir}/ntpclient-drift-rate.awk
+    install -c -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/ntpclient
+}
+






More information about the Openembedded-commits mailing list