Author: glen                         Date: Tue Apr 29 20:45:34 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use functions

---- Files affected:
SOURCES:
   vservers-legacy.init (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: SOURCES/vservers-legacy.init
diff -u SOURCES/vservers-legacy.init:1.3 SOURCES/vservers-legacy.init:1.4
--- SOURCES/vservers-legacy.init:1.3    Tue Apr 29 22:43:37 2008
+++ SOURCES/vservers-legacy.init        Tue Apr 29 22:45:28 2008
@@ -21,12 +21,12 @@
        (
        cd $__CONFDIR
        for serv in *.conf; do
-               test -f "$serv" || continue
+        test -f "$serv" || continue
 
                PRIORITY=100
                . $serv
                test "$ONBOOT" || continue
-               printf "%03d %s\n" $PRIORITY `basename $serv .conf`
+               printf "%03d %s\n" $PRIORITY $(basename $serv .conf)
        done
        ) | sort $* | (while read a b; do echo $b; done)
 }
@@ -42,9 +42,7 @@
        done
 }
 
-# See how we were called.
-case "$1" in
-  start)
+start() {
        if [ ! -f /var/lock/subsys/vservers-legacy ] ; then
            show "Starting the virtual servers"
            busy
@@ -58,8 +56,9 @@
        else
            msg_already_running "virtual servers"
        fi
-       ;;
-  stop)
+}
+
+stop() {
        if [ -f /var/lock/subsys/vservers-legacy ] ; then
            show "Stopping the virtual servers"
            busy
@@ -72,10 +71,20 @@
        else
            msg_not_running "virtual servers"
        fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
        ;;
   restart)
-       $0 stop
-       $0 start
+       stop
+       start
        ;;
   status)
        if [ -f /var/lock/subsys/vservers-legacy ]; then
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/vservers-legacy.init?r1=1.3&r2=1.4&f=u

_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to