diff --git a/gpm.init b/gpm.init index e2efdd6..143d206 100755 --- a/gpm.init +++ b/gpm.init @@ -39,10 +39,12 @@ start() { fi if [ -n "$IMOUSETYPE" ]; then - modprobe sermouse > /dev/null 2>&1 - /usr/sbin/inputattach -$IMOUSETYPE $DEVICE --daemon - DEVICE="/dev/input/mice" - MOUSETYPE="exps2" + if [ "$(pidofproc inputattach)" = "" ]; then + modprobe sermouse > /dev/null 2>&1 + /usr/sbin/inputattach -$IMOUSETYPE $DEVICE --daemon + DEVICE="/dev/input/mice" + MOUSETYPE="exps2" + fi fi if [ -n "$MOUSETYPE" ]; then @@ -58,6 +60,9 @@ start() { stop() { echo -n $"Shutting down console mouse services: " killproc gpm + if [ -n "$IMOUSETYPE" ]; then + killproc inputattach + fi RETVAL=$? echo diff --git a/gpm.spec b/gpm.spec index 493c859..00330d2 100644 --- a/gpm.spec +++ b/gpm.spec @@ -1,7 +1,7 @@ Summary: A mouse server for the Linux console. Name: gpm Version: 1.20.1 -Release: 65 +Release: 66 License: GPL Group: System Environment/Daemons Source: http://ftp.linux.it/pub/People/rubini/gpm/%{name}-%{version}.tar.gz @@ -174,6 +174,10 @@ fi %{_libdir}/libgpm.so %changelog +* Thu Oct 21 2004 Adrian Havill 1.20.1-66 +- avoid spawning multiple copies of inputattach, and kill process + when gpm shuts down (#135776) + * Wed Oct 20 2004 Bill Nottingham 1.20.1-65 - remove buildroot paths from gpm.info, fixing #135305