[Pkg-samba-maint] r3931 - trunk/ctdb/debian

sathieu at alioth.debian.org sathieu at alioth.debian.org
Sat Oct 15 17:07:57 UTC 2011


Author: sathieu
Date: 2011-10-15 17:07:57 +0000 (Sat, 15 Oct 2011)
New Revision: 3931

Modified:
   trunk/ctdb/debian/ctdb.init
Log:
ctdb.init: various changes

Modified: trunk/ctdb/debian/ctdb.init
===================================================================
--- trunk/ctdb/debian/ctdb.init	2011-10-13 18:38:47 UTC (rev 3930)
+++ trunk/ctdb/debian/ctdb.init	2011-10-15 17:07:57 UTC (rev 3931)
@@ -298,7 +298,7 @@
     return 0
 }
 
-start_server() {
+start_ctdbd() {
     build_ctdb_options
 
     # make sure we drop any ips that might still be held if previous
@@ -359,7 +359,7 @@
     return $RETVAL
 }	
 
-stop_server() {
+stop_ctdbd() {
     ctdb shutdown >/dev/null 2>&1
     RETVAL=$?
     count=0
@@ -367,7 +367,7 @@
         start-stop-daemon --stop --quiet --exec $ctdbd
         RETVAL=$?
     fi
-    while pkill -0 -f $ctdbd ; do
+    while running ; do
         sleep 1
         count=$(($count + 1))
         [ $count -gt 10 ] && {
@@ -392,6 +392,7 @@
 	        echo ""
 	    ;;
     esac
+
     return $RETVAL
 }	
 
@@ -404,7 +405,7 @@
             log_end_msg 0
             exit 0
         fi
-        if start_server && running ;  then
+        if start_ctdbd && running ;  then
             # It's ok, the server started and is running
             log_end_msg 0
         else
@@ -417,7 +418,7 @@
         log_daemon_msg "Stopping $DESC" "$NAME"
         if running ; then
             # Only stop the server if we see it running
-            stop_server
+            stop_ctdbd
             log_end_msg $?
         else
             # If it's not running don't do anything
@@ -428,8 +429,8 @@
         ;;
     restart|reload|force-reload)
         log_daemon_msg "Restarting $DESC" "$NAME"
-        running && stop_server
-        start_server
+        running && stop_ctdbd
+        start_ctdbd
         running
         log_end_msg $?
         ;;
@@ -449,8 +450,8 @@
     condrestart)
         if running ;  then
             log_daemon_msg "Restarting $DESC" "$NAME"
-            stop_server
-            start_server
+            stop_ctdbd
+            start_ctdbd
             log_end_msg $?
         fi
         ;;
@@ -458,7 +459,7 @@
         # used from cron to auto-restart ctdb
         if ! running ; then
             log_daemon_msg "Starting $DESC " "$NAME"
-            if start_server && running ;  then
+            if start_ctdbd && running ;  then
                 # It's ok, the server started and is running
                 log_end_msg 0
             else





More information about the Pkg-samba-maint mailing list