Author: glen                         Date: Thu Oct 19 12:08:54 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use functions

---- Files affected:
SOURCES:
   rawdevices.init (1.5 -> 1.6) 

---- Diffs:

================================================================
Index: SOURCES/rawdevices.init
diff -u SOURCES/rawdevices.init:1.5 SOURCES/rawdevices.init:1.6
--- SOURCES/rawdevices.init:1.5 Thu Dec  8 02:02:49 2005
+++ SOURCES/rawdevices.init     Thu Oct 19 14:08:48 2006
@@ -50,10 +50,7 @@
        done
 }
 
-
-# See how we were called.
-case "$1" in
-  start|reload)
+start() {
        if [ ! -f /var/lock/subsys/rawdevices ]; then
                msg_starting rawdevices
                ok
@@ -62,8 +59,9 @@
        else
                msg_already_running rawdevices
        fi
-       ;;
-  stop)
+}
+
+stop() {
        if [ -f /var/lock/subsys/rawdevices ]; then
                msg_stopping rawdevices
                busy
@@ -72,10 +70,19 @@
        else
                msg_not_running rawdevices
        fi
+}
+
+# See how we were called.
+case "$1" in
+  start|reload)
+       start
+       ;;
+  stop)
+       stop
        ;;
   status)
-       ID=`id -u`
-       if [ $ID -eq 0 ]; then
+       id=`id -u`
+       if [ "$id" -eq 0 ]; then
                raw -qa
        else
                # don't remove the space at the end!!!
@@ -83,8 +90,8 @@
        fi
        ;;
   restart|force-reload)
-       $0 stop
-       $0 start
+       stop
+       start
        ;;
 
   *)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/rawdevices.init?r1=1.5&r2=1.6&f=u

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

Reply via email to