summaryrefslogtreecommitdiff
path: root/packages/gpm/gpm-1.20.1/init
blob: bb6e4a3f551b2648d2ffac5ab1018461945cdc7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#! /bin/sh i-e 

# Grab the common functions
. /etc/init.d/functions

# FIXME: 
# Add a configuration file for GPM here

test -x /bin/gpm || exit 0

case "$1" in
  start)
    if [ ! -p /dev/gpmdata ]; then
    	mkfifo /dev/gpmdata
    fi

    action "Starting GPM:" start-stop-daemon -S -x /bin/gpm -- -R -m /dev/mouse -t imps2
    ;;
  stop)
    action "Stopping GPM:" start-stop-daemon -K -x /bin/gpm
    ;;
  restart|force-reload) 
    $0 stop
    $0 start
    ;;
  *)
    usage /etc/init.d/gpm
esac

exit 0