#!/bin/bash
# chkconfig: 12345 20 20
# description: Virtual mouse console event reader
# processname: hostmouse
. /etc/rc.d/init.d/functions
export PATH=/usr/sbin:$PATH

case "$1" in
  start)
	echo -n "Starting hostmouse: "
	modprobe evdev 2> /dev/null
	daemon /usr/sbin/hostmouse
	touch /var/lock/subsys/hostmouse
	echo
	;;
  stop)
	echo -n "Shutting down hostmouse: "
	killproc hostmouse -9
	rm -f /var/lock/subsys/hostmouse
	echo
	;;
  restart)
        $0 stop
        $0 start
        ;;
  *)
	echo "Usage: G3-hostmouse {start|stop|restart}"
	exit 1
esac

exit 0
