Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | #! /bin/sh |
| 2 | |
| 3 | # Grab the common functions |
| 4 | #. /etc/init.d/functions |
| 5 | |
| 6 | # FIXME: |
| 7 | # Add a configuration file for GPM here |
| 8 | |
| 9 | test -x /usr/sbin/gpm || exit 0 |
| 10 | |
| 11 | case "$1" in |
| 12 | start) |
| 13 | if [ ! -p /dev/gpmdata ]; then |
| 14 | mkfifo /dev/gpmdata |
| 15 | fi |
| 16 | |
| 17 | echo "Starting GPM:" |
| 18 | start-stop-daemon -S -x /usr/sbin/gpm -- -R -m /dev/psaux -t ps2 |
| 19 | ;; |
| 20 | stop) |
| 21 | echo "Stopping GPM:" |
| 22 | start-stop-daemon -K -x /usr/sbin/gpm |
| 23 | ;; |
| 24 | restart|force-reload) |
| 25 | $0 stop |
| 26 | $0 start |
| 27 | ;; |
| 28 | *) |
| 29 | usage /etc/init.d/gpm |
| 30 | esac |
| 31 | |
| 32 | exit 0 |