gpm/gpm.init
cvsdist f476c1f288 auto-import changelog data from gpm-1.20.1-44.src.rpm
Wed Mar 17 2004 Bill Nottingham <notting@redhat.com> 1.20.1-44
- include inputattach
- if configured mouse has IMOUSETYPE, use inputattach
Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
Thu Feb 26 2004 Adrian Havill <havill@redhat.com> 1.20.1-43
- add event device (for 2.6 kernel) superpatch-- includes all patches up to
    release 38; thanks to Dmitry Torokhov
- change default mouse device over to /dev/input/mice
- set mouse type to Intellimouse Explorer (exps2), which is what the 2.6
    kernel exports by default
Sat Feb 14 2004 Florian La Roche <Florian.LaRoche@redhat.de>
- already add shared lib symlinks at install time
- fix subscript #114289
Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
Tue Nov 18 2003 Adrian Havill <havill@redhat.com> 1.20.1-39
- re-add the $OPTIONS that gets pulled in from /etc/sysconfig/gpm to the
    init.d script (#110248)
2004-09-09 05:52:18 +00:00

98 lines
1.7 KiB
Bash
Executable File

#!/bin/bash
#
# chkconfig: 2345 85 15
# description: GPM adds mouse support to text-based Linux applications such \
# as the Midnight Commander. It also allows mouse-based console \
# cut-and-paste operations, and includes support for pop-up \
# menus on the console.
# processname: gpm
# pidfile: /var/run/gpm.pid
# config: /etc/sysconfig/mouse
# source function library
. /etc/init.d/functions
[ -e /etc/sysconfig/gpm ] && . /etc/sysconfig/gpm
MOUSECFG=/etc/sysconfig/mouse
RETVAL=0
start() {
echo -n $"Starting console mouse services: "
if [ -f "$MOUSECFG" ]; then
. "$MOUSECFG"
else
echo $"(no mouse is configured)"
exit 0
fi
if [ "$MOUSETYPE" = "none" ]; then
echo $"(no mouse is configured)"
exit 0
fi
if [ "$MOUSETYPE" = "Microsoft" ]; then
MOUSETYPE=ms
fi
if [ -z "$DEVICE" ]; then
DEVICE="/dev/mouse"
fi
if [ -n "$IMOUSETYPE" ]; then
modprobe sermouse > /dev/null 2>&1
/usr/sbin/inputattach -$IMOUSETYPE $DEVICE --daemon
. /etc/sysconfig/gpm
fi
if [ -n "$MOUSETYPE" ]; then
daemon gpm -m $DEVICE -t $MOUSETYPE $OPTIONS
else
daemon gpm -m $DEVICE $OPTIONS
fi
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/gpm
}
stop() {
echo -n $"Shutting down console mouse services: "
killproc gpm
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/gpm
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
RETVAL=$?
;;
condrestart)
if [ -f /var/lock/subsys/gpm ]; then
stop
start
RETVAL=$?
fi
;;
status)
status gpm
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac
exit $RETVAL