#!/bin/sh killproc() { # kill the named process(es) pid=`/bin/ps -e x | /bin/grep $1 | /bin/grep -v grep | /bin/sed -e 's/^ *//' -e 's/ .*//'` [ "$pid" != "" ] && kill $pid } . @appconfdir@/config case "$1" in start) echo "Starting Zaurusd" if [ "x$HAVE_ALSA_MIXER" != "x" ]; then @sbindir@/alsactl restore fi if [ "x$HAVE_INPUT_SWITCHES" != "x" -a -x @bindir@/switchevd ]; then @bindir@/switchevd $SWITCH_EVENT_DEVICE & fi if [ "x$HAVE_TSKEYS" != "x" -a -x @bindir@/tskeys ]; then modprobe uinput if [ -x @bindir@/setleds ]; then @bindir@/setleds +num < /dev/tty0 fi if [ -e @sysconfdir@/profile.d/tslib.sh ]; then . @sysconfdir@/profile.d/tslib.sh fi if [ -e @sysconfdir@/pointercal ]; then @bindir@/tskeys $TSKEYS_CONF $TSKEYS_DEVICE & fi fi ;; stop) echo "Stopping Zaurusd" if [ -x @bindir@/switchevd ]; then killproc @bindir@/switchevd fi if [ -x @bindir@/tskeys ]; then killproc @bindir@/tskeys fi if [ "x$HAVE_ALSA_MIXER" != "x" ]; then @sbindir@/alsactl store fi ;; restart) $0 stop sleep 1 $0 start ;; *) echo "usage: $0 { start | stop }" exit 1 ;; esac exit 0