#!/bin/sh
# Start gpm mouse server.

# Set this to: ms bare msc mman sun mm logi bm ps2 ncs wacom
# Give the command 'gpm -t help' for more information.
# Example line to set Mouse Systems type mouse (msc):
#	TYPE=msc
TYPE=''

PATH=/sbin:/usr/sbin:/bin:/usr/bin
[ -x /usr/bin/gpm ] || exit 0
echo $0

case "$1" in
    start)
	if [ "$TYPE" = "" ];then
		echo "Edit /etc/init.c/gpm to set your mouse type"
		exit 1
	fi
	if [ ! -c /dev/mouse ];then
		echo "Make /dev/mouse a link to your mouse device."
		exit 1
	fi
	gpm -t $TYPE
	;;
    stop)
	gpm -k
	;;
    *)
	echo "Usage: $0 {start|stop}"
	exit 1
	;;
esac
exit 0
