#!/bin/sh
#
# mouse -- start or stop the gpm mouse server

. /etc/rc.d/sysconfig

case "$1" in
start)
    if [ "$MOUSETYPE" -a -x /usr/bin/gpm ]; then
	need filesystems

	echo "enabling mouse"
	/usr/bin/gpm -R -m$MOUSEDEV -t$MOUSETYPE
    fi ;;

info)
    echo "The mouse"
    ;;
stop)
    if [ -r /var/run/gpmpid ]; then
	PID=`cat /var/run/gpmpid`
	echo "disabling mouse"
	${PID:+kill $PID}
    fi
    ;;

*)
    echo "usage: $0 {start|stop}"
    ;;
esac
