aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/palmpre/tsmd
diff options
context:
space:
mode:
authorSimon Busch <morphis@gravedo.de>2011-02-25 22:12:11 +0100
committerSimon Busch <morphis@gravedo.de>2011-02-27 13:32:50 +0100
commit15de5d3ab224abf7e97ad0d249cb5053b34fc873 (patch)
tree7f9f15ac1ce9afe619c277c2333ebcb16d34c787 /recipes/palmpre/tsmd
parent50e7d72e638e5ecf631ae51f4bfd2a81d363f48f (diff)
downloadopenembedded-15de5d3ab224abf7e97ad0d249cb5053b34fc873.tar.gz
tsmd: return of the old init script
Signed-off-by: Simon Busch <morphis@gravedo.de>
Diffstat (limited to 'recipes/palmpre/tsmd')
-rwxr-xr-xrecipes/palmpre/tsmd/tsmd38
1 files changed, 38 insertions, 0 deletions
diff --git a/recipes/palmpre/tsmd/tsmd b/recipes/palmpre/tsmd/tsmd
new file mode 100755
index 0000000000..5444d7b347
--- /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