1 #! /bin/sh
3 NODE=`cd /sys; find . | grep kim | grep install`
4 if [ $NODE ]
5 then
6 echo UIM SYSFS Node Found at /sys/$NODE
7 else
8 echo UIM SYSFS Node Not Found
9 exit 0
10 fi
12 uim="/usr/bin/uim"
13 uim_args="-f `dirname /sys/$NODE`"
15 test -x "$uim" || exit 0
17 case "$1" in
18 start)
19 echo -n "Starting uim-sysfs daemon"
20 start-stop-daemon --start --quiet --pidfile /var/run/uim.pid --make-pidfile --exec $uim -- $uim_args &
21 echo "."
22 ;;
23 stop)
24 echo -n "Stopping uim-sysfs daemon"
25 start-stop-daemon --stop --quiet --pidfile /var/run/uim.pid
26 echo "."
27 ;;
28 *)
29 echo "Usage: /etc/init.d/uim-sysfs.sh {start|stop}"
30 exit 1
31 esac
33 exit 0