read_tokens: add initscript to read tokens on boot
authorSimon Busch <morphis@amethyst.openembedded.net>
Sun, 19 Dec 2010 19:06:08 +0000 (20:06 +0100)
committerSimon Busch <morphis@gravedo.de>
Tue, 4 Jan 2011 10:41:52 +0000 (11:41 +0100)
Signed-off-by: Simon Busch <morphis@amethyst.openembedded.net>
recipes/palmpre/read-tokens/read_tokens [new file with mode: 0644]
recipes/palmpre/read-tokens_git.bb

diff --git a/recipes/palmpre/read-tokens/read_tokens b/recipes/palmpre/read-tokens/read_tokens
new file mode 100644 (file)
index 0000000..5997226
--- /dev/null
@@ -0,0 +1,6 @@
+
+#!/bin/sh
+
+if [ ! -e /etc/tokens ] ; then
+       /usr/bin/read_tokens > /etc/tokens
+fi
index d958438..178163b 100644 (file)
@@ -3,13 +3,25 @@ HOMEPAGE = "http://www.freesmartphone.org"
 AUTHOR = "Simon Busch <morphis@gravedo.de>
 SECTION = "console/utils"
 LICENSE = "GPL"
-PR = "r0"
+PR = "r1"
 PV = "1.0.0+gitr${SRCPV}"
 
 SRCREV = "93a640dafa8ebebdb1a03f051cb1b566629b227c"
-SRC_URI = "${FREESMARTPHONE_GIT}/utilities.git;protocol=git;branch=master"
+SRC_URI = " \
+ ${FREESMARTPHONE_GIT}/utilities.git;protocol=git;branch=master \
+ file://read_tokens \
+"
 S = "${WORKDIR}/git/palmpre/read_tokens"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-inherit autotools
+inherit autotools update-rc.d
+
+INITSCRIPT_NAME = "read_tokens"
+INITSCRIPT_PARAMS = "defaults 23"
+
+do_install_append() {
+       install -d ${D}${sysconfdir}/init.d/
+       install -m 0755 ${WORKDIR}/read_tokens ${D}${sysconfdir}/init.d/
+}
+