home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- . /etc/init.d/functions
-
- PATH=$PATH:/usr/sbin
-
- if [ -f /etc/sysconfig/mouse ]
- then
- . /etc/sysconfig/mouse
- fi
-
- if [ -z "$MDEVICE" ] || [ -z "$PROTOCOL" ]
- then
- echo "Please create an /etc/sysconfig/mouse file containing"
- echo "MDEVICE and PROTOCOL values"
- exit 1;
- fi
-
- case "$1" in
- start)
- echo "Starting gpm..."
- gpm -m $MDEVICE -t $PROTOCOL
- ;;
- stop)
- echo "Stopping gpm..."
- gpm
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- *)
- echo "Usage: $0 {start|stop|restart}"
- exit 1
- ;;
- esac
-