rpms/gpm/F-9 gpm-1.20.1-doc.patch, NONE, 1.1 gpm.init, 1.16, 1.17 gpm.spec, 1.59, 1.60

Zdenek Prikryl (zprikryl) fedora-extras-commits at redhat.com
Thu May 29 12:06:05 UTC 2008


Author: zprikryl

Update of /cvs/extras/rpms/gpm/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv431

Modified Files:
	gpm.init gpm.spec 
Added Files:
	gpm-1.20.1-doc.patch 
Log Message:
Fixed init script to comply with LSB standard (#246937)
Fixed typo in doc (#446679)


gpm-1.20.1-doc.patch:

--- NEW FILE gpm-1.20.1-doc.patch ---
--- gpm-1.20.1/doc/gpm.info.orig	2008-05-22 16:10:27.000000000 +0200
+++ gpm-1.20.1/doc/gpm.info	2008-05-22 16:10:34.000000000 +0200
@@ -5,7 +5,7 @@ produced by makeinfo version 4.0 from
 
 INFO-DIR-SECTION Miscellaneous
 START-INFO-DIR-ENTRY
-* Gpm: (gpm).   A server wich hands mouse events to non-X programs.
+* Gpm: (gpm).   A server which hands mouse events to non-X programs.
 END-INFO-DIR-ENTRY
 
    This file is a user's and programmer's manual for gpm 1.20.1.


Index: gpm.init
===================================================================
RCS file: /cvs/extras/rpms/gpm/F-9/gpm.init,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- gpm.init	10 Oct 2006 18:33:49 -0000	1.16
+++ gpm.init	29 May 2008 12:05:22 -0000	1.17
@@ -9,6 +9,19 @@
 # pidfile: /var/run/gpm.pid
 # config: /etc/sysconfig/mouse
 
+### BEGIN INIT INFO
+# Provides: gpm
+# Required-Start: $syslog $local_fs
+# Required-Stop: $syslog $local_fs
+# Default-Start:  2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start and stop gpm daemon
+# 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.
+### END INIT INFO
+
 # source function library
 . /etc/init.d/functions
 
@@ -18,55 +31,77 @@
 
 RETVAL=0
 
-start() {
-	echo -n $"Starting console mouse services: "
-
-	if [ -z "$MOUSETYPE" ]; then
-	    MOUSETYPE="exps2"
-	fi
-
-	if [ -z "$DEVICE" ]; then
-	    DEVICE="/dev/input/mice"
-	fi
-
-	if [ "$MOUSETYPE" = "none" ]; then
-		echo $"(no mouse is configured)"
-		exit 0
-	fi
+check() {
+	# Check that we're a privileged user
+	[ `id -u` = 0 ] || exit 4
+	
+	# Check if acpid is executable
+	test -x /usr/sbin/gpm || exit 5
+}
 
-	if [ "$MOUSETYPE" = "Microsoft" ]; then
-		MOUSETYPE=ms
-	fi
+start() {
 
-	if [ -n "$IMOUSETYPE" ]; then
-                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
-		daemon gpm -m $DEVICE -t $MOUSETYPE $OPTIONS
-	else
-		daemon gpm -m $DEVICE $OPTIONS
+	check
+		
+	if [ ! -f /var/lock/subsys/gpm ]; then
+		echo -n $"Starting console mouse services: "
+	
+		if [ -z "$MOUSETYPE" ]; then
+		    MOUSETYPE="exps2"
+		fi
+	
+		if [ -z "$DEVICE" ]; then
+		    DEVICE="/dev/input/mice"
+		fi
+	
+		if [ "$MOUSETYPE" = "none" ]; then
+			echo $"(no mouse is configured)"
+			exit 0
+		fi
+	
+		if [ "$MOUSETYPE" = "Microsoft" ]; then
+			MOUSETYPE=ms
+		fi
+	
+		if [ -n "$IMOUSETYPE" ]; then
+			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
+			daemon /usr/sbin/gpm -m $DEVICE -t $MOUSETYPE $OPTIONS
+		else
+			daemon /usr/sbin/gpm -m $DEVICE $OPTIONS
+		fi
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/gpm
+		echo
 	fi
-	RETVAL=$?
-	echo
-	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/gpm
+	return $RETVAL
 }
 
 stop() {
+	
+	check
+	
 	echo -n $"Shutting down console mouse services: "
-	killproc gpm
+	killproc /usr/sbin/gpm
 	if [ -n "$IMOUSETYPE" ]; then
 		killproc inputattach
 	fi
 	RETVAL=$?
-
-	echo
 	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/gpm
+	echo
+	return $RETVAL
+}
+
+restart() {
+	stop
+	start
 }
 
 case "$1" in
@@ -76,14 +111,16 @@
   stop)
 	stop
 	;;
-  restart|reload)
-	stop
-	start
+  force-reload|reload)
+	echo "$0: Unimplemented feature."
+	RETVAL=3
+	;;
+  restart)
+	restart
 	;;
   condrestart)
 	if [ -f /var/lock/subsys/gpm ]; then
-	    stop
-	    start
+	    restart
 	fi
 	;;
   status)
@@ -91,8 +128,8 @@
 	RETVAL=$?
 	;;
   *)
-	echo $"Usage: $0 {start|stop|restart|condrestart|status}"
-	exit 1
+	echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload}"
+	RETVAL=2
 esac
 
 exit $RETVAL


Index: gpm.spec
===================================================================
RCS file: /cvs/extras/rpms/gpm/F-9/gpm.spec,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- gpm.spec	20 Feb 2008 05:31:45 -0000	1.59
+++ gpm.spec	29 May 2008 12:05:22 -0000	1.60
@@ -1,7 +1,7 @@
 Summary: A mouse server for the Linux console.
 Name: gpm
 Version: 1.20.1
-Release: 90%{?dist}
+Release: 91%{?dist}
 License: GPLv2+
 Group: System Environment/Daemons
 Source: http://ftp.linux.it/pub/People/rubini/gpm/%{name}-%{version}.tar.gz
@@ -25,6 +25,7 @@
 Patch25: gpm-1.20.1-default-handler.patch
 Patch26: gpm-1.20.1-va_list.patch
 Patch27: gpm-1.20.1-openmax.patch
+Patch28: gpm-1.20.1-doc.patch
 
 Prereq: /sbin/chkconfig /sbin/ldconfig /sbin/install-info
 Requires: bash >= 2.0
@@ -74,6 +75,8 @@
 %patch25 -p1 -b .default-handler
 %patch26 -p1 -b .va_list
 %patch27 -p1 -b .openmax
+%patch28 -p1 -b .doc
+
 
 %build
 rm -f configure
@@ -193,6 +196,10 @@
 %{_libdir}/libgpm.so
 
 %changelog
+* Thu May 29 2008 Zdenek Prikryl <zprikryl at redhat.com> - 1.20.1-91
+- Fixed init script to comply with LSB standard (#246937)
+- Fixed typo in doc (#446679)
+
 * Wed Feb 20 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 1.20.1-90
 - Autorebuild for GCC 4.3
 
@@ -460,7 +467,7 @@
 - Don't crash if we can't open /dev/console
   (Happens with some devfs enabled kernels)
 
-* Tue Jan 23 2001 Trond Eivind Glomsrød <teg at redhat.com>
+* Tue Jan 23 2001 Trond Eivind Glomsr�d <teg at redhat.com>
 - fix bug in i18n of initscript
 
 * Tue Jan 23 2001 Preston Brown <pbrown at redhat.com>




More information about the fedora-extras-commits mailing list