#!/bin/sh
# description: console mouse driver
#
# (c) 2004, Eko M. Budi, for Vector Linux
# Released under GNU GPL

#
# Include the functions declared in the /etc/rc.d/functions file
source /etc/rc.d/functions

# path to binary
ROOT="/usr/sbin"
# name of binary to run
APP="gpm"
#device
DEV="-m /dev/mouse"
#runtime options
# Use normal mouse
OPT="-t ps2"
# Use wheel mouse
#OPT="-t imps2"

#server name & description
SERVER="Console mouse daemon"

case "$1" in
        start)
                echon "Starting $SERVER............"
                loadproc $ROOT/$APP $DEV $OPT
                ;;
        reload)
                echon "Reloading $SERVER..........."
                checkloadproc $ROOT/$APP $DEV $OPT
                ;;
        stop)
                echon "Stopping $SERVER............"
                killproc $ROOT/$APP
                ;;
        restart)
                $0 stop
                /bin/sleep 1
                $0 start
                ;;
        status)
                statusproc $ROOT/$APP
                ;;
        *)
                echo "Usage: $0 {start|stop|reload|restart|status}"
                exit 1
        ;;

esac

# End /etc/init.d/
