Author: glen                         Date: Tue Sep 26 22:51:30 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use functions

---- Files affected:
SOURCES:
   gpm.init (1.24 -> 1.25) 

---- Diffs:

================================================================
Index: SOURCES/gpm.init
diff -u SOURCES/gpm.init:1.24 SOURCES/gpm.init:1.25
--- SOURCES/gpm.init:1.24       Thu Dec  8 02:02:49 2005
+++ SOURCES/gpm.init    Wed Sep 27 00:51:25 2006
@@ -28,10 +28,7 @@
 [ -z "$DEVICE" ] && nls "Please set %s in /etc/sysconfig/mouse" "DEVICE"
 [ -z "$MOUSETYPE" ] && nls "Please set %s in /etc/sysconfig/mouse" "MOUSETYPE"
 
-RETVAL=0
-# See how we were called.
-case "$1" in
-  start)
+start() {
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/gpm ]; then
                msg_starting "Gpm"
@@ -62,8 +59,9 @@
        else
                msg_already_running "Gpm"
        fi
-       ;;
-  stop)
+}
+
+stop() {
        if [ -f /var/lock/subsys/gpm ]; then
                msg_stopping "Gpm"
                killproc gpm
@@ -71,11 +69,20 @@
        else
                msg_not_running "Gpm"
        fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
        ;;
   restart|force-reload)
-       $0 stop
-       $0 start
-       exit $?
+       stop
+       start
        ;;
   status)
        status gpm
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/gpm.init?r1=1.24&r2=1.25&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to