home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 16 / hacker16 / 16_HACKER16.ISO / linux / tpm-security-server-1.2.1.iso / etc / rc.d / init.d / gpm < prev    next >
Encoding:
Text File  |  2004-01-27  |  768 b   |  37 lines

  1. #!/bin/sh
  2. . /etc/init.d/functions
  3.  
  4. PATH=$PATH:/usr/sbin
  5.  
  6. if [ -f /etc/sysconfig/mouse ]
  7.         then
  8.         . /etc/sysconfig/mouse
  9. fi
  10.  
  11. if [ -z "$MDEVICE" ] || [ -z "$PROTOCOL" ]
  12.         then
  13.         echo "Please create an /etc/sysconfig/mouse file containing"
  14.         echo "MDEVICE and PROTOCOL values"
  15.         exit 1;
  16. fi
  17.  
  18. case "$1" in
  19.         start)
  20.                 echo "Starting gpm..."
  21.                 gpm -m $MDEVICE -t $PROTOCOL
  22.                 ;;
  23.         stop)
  24.                 echo "Stopping gpm..."
  25.                 gpm
  26.                 ;;
  27.         restart)
  28.                 $0 stop
  29.                 sleep 1
  30.                 $0 start
  31.                 ;;
  32.         *)
  33.                 echo "Usage: $0 {start|stop|restart}"
  34.                 exit 1
  35.                 ;;
  36. esac
  37.