[SCM] TANGO distributed control system. branch, master, updated. debian/6.1.1c-1-116-gd64a2d0

Picca Frédéric-Emmanuel picca at synchrotron-soleil.fr
Fri Dec 17 22:22:15 UTC 2010


The following commit has been merged in the master branch:
commit d64a2d037a3152291381c81d571c9711b88561c3
Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
Date:   Fri Dec 17 16:43:07 2010 -0500

    * thanks manu for thoses changes.
    
    we now have a better init.d sequence.

diff --git a/debian/tango-accesscontrol.init.d b/debian/tango-accesscontrol.init.d
index 9dcb8b4..b91a3d2 100644
--- a/debian/tango-accesscontrol.init.d
+++ b/debian/tango-accesscontrol.init.d
@@ -44,9 +44,11 @@ do_start()
 	#   1 if daemon was already running
 	#   2 if daemon could not be started
 
-        # check thaht the database is ready
-        tango_admin --ping-database 6 || return 2
-
+	# to start this daemon need a working network and a working database
+	# the database can be on another computer so we need to check that
+	# it was already started.
+	tango_admin --ping-network 4 || return 2
+	tango_admin --ping-database 6 || return 2
 	start-stop-daemon --start --quiet --chuid tango:tango --background \
 	    --make-pidfile --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
 	    || return 1
diff --git a/debian/tango-db.init.d b/debian/tango-db.init.d
index 7f3345d..7d42619 100644
--- a/debian/tango-db.init.d
+++ b/debian/tango-db.init.d
@@ -47,6 +47,9 @@ do_start()
 	#   0 if daemon has been started
 	#   1 if daemon was already running
 	#   2 if daemon could not be started
+
+	# to start this daemon need a working network
+	tango_admin --ping-network 4 || return 2
 	start-stop-daemon --start --quiet --chuid tango:tango --background \
 	    --make-pidfile --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
 	    || return 1
@@ -56,7 +59,7 @@ do_start()
 	# Add code here, if necessary, that waits for the process to be ready
 	# to handle requests from services started subsequently which depend
 	# on this one.  As a last resort, sleep for some time.
-        tango_admin --ping-database 6 || return 2
+	tango_admin --ping-database 6 || return 2
 }
 
 #
diff --git a/debian/tango-starter.init.d b/debian/tango-starter.init.d
index 57a84a9..3006453 100644
--- a/debian/tango-starter.init.d
+++ b/debian/tango-starter.init.d
@@ -42,11 +42,12 @@ do_start()
 	# Return
 	#   0 if daemon has been started
 	#   1 if daemon was already running
-        #   2 if daemon could not be started
+	#   2 if daemon could not be started
 
-        # first check for a running tango-database and
-        tango_admin --ping-database 6 || return 2
-        #register the tango-starter if necessary
+	# first check for a running network and tango-database
+	tango_admin --ping-network 4 || return 2
+	tango_admin --ping-database 6 || return 2
+	# register the tango-starter if necessary
 	tango_admin --check-device tango/admin/`hostname` || tango_admin --add-server Starter/`hostname` Starter tango/admin/`hostname` || return 2
 
 	start-stop-daemon --start --quiet --chuid tango:tango --background \

-- 
TANGO distributed control system.



More information about the debian-science-commits mailing list