#! /bin/sh
#
# Copyright (c) 1998 Florian La Roche
#

. /etc/rc.config
test -z "$GPM_PARAM" && exit 0

PIDFILE=/var/run/gpm.pid

case "$1" in
    start)	if test -x /usr/sbin/gpm ; then
			echo "Starting console mouse support. (gpm)"
			/usr/sbin/gpm $GPM_PARAM &
		fi
		;;
    stop)	if test -f $PIDFILE ; then
			echo "Shutting down console mouse support (gpm)."
			killall -TERM -p`cat $PIDFILE` /usr/sbin/gpm
		fi
		;;
    reload)	;;
    *)		echo "Usage: $0 {start|stop}"
		exit 1
esac

exit 0
