summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 23c650f)
raw | patch | inline | side by side (parent: 23c650f)
author | Eyal Reizer <eyalr@ti.com> | |
Tue, 10 Mar 2015 15:10:44 +0000 (17:10 +0200) | ||
committer | Eyal Reizer <eyalr@ti.com> | |
Tue, 10 Mar 2015 15:10:44 +0000 (17:10 +0200) |
Add an init.d script used for starting the uim daemon
when the kernel boots.
Signed-off-by: Eyal Reizer <eyalr@ti.com>
when the kernel boots.
Signed-off-by: Eyal Reizer <eyalr@ti.com>
scripts/uim-sysfs | [new file with mode: 0644] | patch | blob |
diff --git a/scripts/uim-sysfs b/scripts/uim-sysfs
--- /dev/null
+++ b/scripts/uim-sysfs
@@ -0,0 +1,34 @@
+#! /bin/sh
+
+NODE=`cd /sys; find . | grep kim | grep install`
+if [ $NODE ]
+then
+ echo UIM SYSFS Node Found at /sys/$NODE
+else
+ echo UIM SYSFS Node Not Found
+ exit 0
+fi
+
+uim="/usr/bin/uim"
+uim_args="-f `dirname /sys/$NODE`"
+
+test -x "$uim" || exit 0
+
+case "$1" in
+ start)
+ echo -n "Starting uim-sysfs daemon"
+ start-stop-daemon --start --quiet --pidfile /var/run/uim.pid --make-pidfile --exec $uim -- $uim_args &
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping uim-sysfs daemon"
+ start-stop-daemon --stop --quiet --pidfile /var/run/uim.pid
+ echo "."
+ ;;
+ *)
+ echo "Usage: /etc/init.d/uim-sysfs {start|stop}"
+ exit 1
+esac
+
+exit 0
+