source: bootscripts-standard/bootscripts/cblfs/init.d/gpm@ 2167cfe

Last change on this file since 2167cfe was 2167cfe, checked in by William Harrington <kb0iic@…>, 11 years ago

bootscripts are the scripts used for the sysvinit book.

  • Property mode set to 100644
File size: 1002 bytes
RevLine 
[2167cfe]1#!/bin/bash
2# Begin $rc_base/init.d/gpm
3
4# Based on sysklogd script from LFS-3.1 and earlier.
5# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
6# GPM specific parts by Mark Hymers - markh@linuxfromscratch.org
7
8#$LastChangedBy: dnicholson $
9#$Date: 2006-10-11 02:42:17 -0500 (Wed, 11 Oct 2006) $
10
11. /etc/sysconfig/rc
12. $rc_functions
13
14pidfile=/var/run/gpm.pid
15
16if [ -f /etc/sysconfig/mouse ]
17 then
18 . /etc/sysconfig/mouse
19fi
20
21if [ -z "$MDEVICE" ] || [ -z "$PROTOCOL" ]
22 then
23 echo "Please create an /etc/sysconfig/mouse file containing"
24 echo "MDEVICE and PROTOCOL values"
25 exit 1;
26fi
27
28case "$1" in
29 start)
30 boot_mesg "Starting gpm..."
31 loadproc -p $pidfile /usr/sbin/gpm -m $MDEVICE -t $PROTOCOL $GPMOPTS
32 ;;
33
34 stop)
35 boot_mesg "Stopping gpm..."
36 killproc -p $pidfile /usr/sbin/gpm
37 ;;
38
39 restart)
40 $0 stop
41 sleep 1
42 $0 start
43 ;;
44
45 status)
46 statusproc -p $pidfile /usr/sbin/gpm
47 ;;
48
49 *)
50 echo "Usage: $0 {start|stop|restart|status}"
51 exit 1
52 ;;
53esac
54
55# End $rc_base/init.d/gpm
Note: See TracBrowser for help on using the repository browser.