[oe-commits] Simon Busch : tsmd: return of the old init script

git version control git at git.openembedded.org
Sun Feb 27 13:12:41 UTC 2011


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 15de5d3ab224abf7e97ad0d249cb5053b34fc873
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=15de5d3ab224abf7e97ad0d249cb5053b34fc873

Author: Simon Busch <morphis at gravedo.de>
Date:   Fri Feb 25 22:12:11 2011 +0100

tsmd: return of the old init script

Signed-off-by: Simon Busch <morphis at gravedo.de>

---

 recipes/palmpre/tsmd/tsmd   |   38 ++++++++++++++++++++++++++++++++++++++
 recipes/palmpre/tsmd_git.bb |   13 +++++++++++--
 2 files changed, 49 insertions(+), 2 deletions(-)

diff --git a/recipes/palmpre/tsmd/tsmd b/recipes/palmpre/tsmd/tsmd
new file mode 100755
index 0000000..5444d7b
--- /dev/null
+++ b/recipes/palmpre/tsmd/tsmd
@@ -0,0 +1,38 @@
+#! /bin/sh
+#
+# tsmd -- This shell script starts and stops the tsmd daemon
+#
+# chkconfig: 345 10 10
+# description: a simple utility daemon which forwards all events from a independent device node to a more general uinput one
+# processname: tsmd
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+NAME=tsmd
+
+case "$1" in
+    start)
+        echo -n "Starting tsmd: "
+        start-stop-daemon --start --pidfile /var/run/${NAME}.pid --make-pidfile --background -x /usr/bin/${NAME} -- -n /dev/touchscreen -f
+        if [ $? = 0 ]; then
+            echo "(ok)"
+        else
+            echo "(failed)"
+        fi
+        ;;
+    stop)
+        echo -n "Stopping tsmd: "
+        start-stop-daemon --stop --pidfile /var/run/${NAME}.pid --oknodo
+        rm -f /var/run/${NAME}.pid
+        echo "(done)"
+        ;;
+    restart|force-reload)
+        $0 stop
+        $0 start
+        ;;
+    *)
+        echo "Usage: /etc/init.d/tsmd {start|stop|restart|force-reload}"
+        exit 1
+        ;;
+esac
+
+exit 0
diff --git a/recipes/palmpre/tsmd_git.bb b/recipes/palmpre/tsmd_git.bb
index eeac86d..a7c6054 100644
--- a/recipes/palmpre/tsmd_git.bb
+++ b/recipes/palmpre/tsmd_git.bb
@@ -6,16 +6,25 @@ LICENSE = "GPL"
 
 DEPENDS = "tslib"
 
-PR = "r1"
+PR = "r2"
 PV = "1.0.0+gitr${SRCPV}"
 
 SRCREV = "9262a2e4f8f6e6c7bcacf1eeae0ad348cbfcce06"
 SRC_URI = " \
  ${FREESMARTPHONE_GIT}/utilities.git;protocol=git;branch=master \
+ file://tsmd \
 "
 
 S = "${WORKDIR}/git/palmpre/tsmd"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-inherit autotools
+inherit autotools update-rc.d
+
+INITSCRIPT_NAME = "tsmd"
+INITSCRIPT_PARAMS = "defaults 10"
+
+do_install_append() {
+	install -d 0644 ${D}${sysconfdir}/init.d/
+	install -m 0755 ${WORKDIR}/${INITSCRIPT_NAME} ${D}${sysconfdir}/init.d/
+}





More information about the Openembedded-commits mailing list