Author: glen                         Date: Mon Oct 30 16:42:21 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use functions

---- Files affected:
SOURCES:
   postgresql.init (1.71 -> 1.72) 

---- Diffs:

================================================================
Index: SOURCES/postgresql.init
diff -u SOURCES/postgresql.init:1.71 SOURCES/postgresql.init:1.72
--- SOURCES/postgresql.init:1.71        Mon Oct 30 17:40:44 2006
+++ SOURCES/postgresql.init     Mon Oct 30 17:42:15 2006
@@ -114,12 +114,7 @@
 # End of useful functions.
 #
 
-
-# See how we were called.
-# Every action is performed for all given (all configured by default)
-# db clusters.
-case "$action" in
-  start)
+start() {
        for pgdir in $DB_CLUSTERS; do
                pgstatus "$pgdir"
                if [ "$PG_STATUS" = "running" ]; then
@@ -139,8 +134,9 @@
                fi
        done
        pgsubsys
-       ;;
-  stop)
+}
+
+stop() {
        for pgdir in $DB_CLUSTERS; do
                pgstatus "$pgdir"
                if [ "$PG_STATUS" = "not running" ]; then
@@ -166,6 +162,17 @@
                fi
        done
        pgsubsys
+}
+
+# See how we were called.
+# Every action is performed for all given (all configured by default)
+# db clusters.
+case "$action" in
+  start)
+       start
+       ;;
+  stop)
+       stop
        ;;
   status)
        for pgdir in $DB_CLUSTERS; do
@@ -181,8 +188,8 @@
        done
        ;;
   restart)
-       $0 stop "$DB_CLUSTERS"
-       $0 start "$DB_CLUSTERS"
+       stop
+       start
        ;;
   reload|force-reload)
        for pgdir in $DB_CLUSTERS; do
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/postgresql.init?r1=1.71&r2=1.72&f=u

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

Reply via email to