summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorTobias Breckle <tobias@breckle.net>2011-05-17 15:02:36 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2011-05-18 11:09:15 +0200
commit866ee3692f2799abd990936db36578911ecc35e4 (patch)
tree66c4a78cf0d047bfa698326f0c8b4506449c3a0f /package
parentd842df48b6c2bdcd7801b37d4c44efc5daa84c91 (diff)
added timefetching on ntpclient at startup
Signed-off-by: Tobias Breckle <tobias@breckle.net>
Diffstat (limited to 'package')
-rw-r--r--package/ntpclient/Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/package/ntpclient/Makefile b/package/ntpclient/Makefile
index baa7d48f9..e5e1f88de 100644
--- a/package/ntpclient/Makefile
+++ b/package/ntpclient/Makefile
@@ -16,6 +16,14 @@ PKG_SITES:= http://doolittle.icarus.com/ntpclient/
DISTFILES:= ${PKG_NAME}_${PKG_VERSION}.tar.gz
WRKDIST= ${WRKDIR}/${PKG_NAME}-2007
+PKG_FLAVOURS_NTPCLIENT:= STARTUP
+PKGFD_STARTUP:= Fetch time on startup
+
+PKG_FLAVOURS_STRING_NTPCLIENT:= HOST
+PKGFD_HOST:= Fetch time from this NTP host
+PKGFX_HOST:= 0.de.pool.ntp.org
+PKGFC_HOST:= depends on ADK_PACKAGE_NTPCLIENT_STARTUP
+
include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,NTPCLIENT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
@@ -30,4 +38,10 @@ do-install:
${INSTALL_DIR} ${IDIR_NTPCLIENT}/usr/sbin
${INSTALL_BIN} ${WRKBUILD}/ntpclient ${IDIR_NTPCLIENT}/usr/sbin/
+ifeq (${ADK_PACKAGE_NTPCLIENT_STARTUP},y)
+ ${INSTALL_DIR} ${IDIR_NTPCLIENT}/etc/init.d
+ touch ${IDIR_NTPCLIENT}/etc/init.d/ntpclient
+ echo -e "#!/bin/sh\n#INIT 91\nntpclient -h ${ADK_PACKAGE_NTPCLIENT_HOST} -s\nexit 0" > ${IDIR_NTPCLIENT}/etc/init.d/ntpclient
+endif
+
include ${TOPDIR}/mk/pkg-bottom.mk