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

Picca Frédéric-Emmanuel picca at synchrotron-soleil.fr
Thu Dec 16 22:56:58 UTC 2010


The following commit has been merged in the master branch:
commit 7d9a9b782aaf6be30149a85ec0c74e5b7f1f09f5
Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
Date:   Thu Dec 16 16:24:37 2010 -0500

    * use the new tango_admin ping-database possibility in the init.d scripts

diff --git a/debian/tango-accesscontrol.init.d b/debian/tango-accesscontrol.init.d
index 108ee68..9dcb8b4 100644
--- a/debian/tango-accesscontrol.init.d
+++ b/debian/tango-accesscontrol.init.d
@@ -14,7 +14,7 @@
 
 # Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
 
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/tango
 DESC="Tango Control System - accesscontrol"
 NAME=tango-accesscontrol
 NAME_REAL=TangoAccessControl
@@ -43,6 +43,10 @@ do_start()
 	#   0 if daemon has been started
 	#   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
+
 	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 b905d47..7f3345d 100644
--- a/debian/tango-db.init.d
+++ b/debian/tango-db.init.d
@@ -16,7 +16,7 @@
 
 # Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
 
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/tango
 DESC="Tango Control System - database"
 NAME=tango-db
 NAME_REAL=DataBaseds
@@ -56,7 +56,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.
-	sleep 3
+        tango_admin --ping-database 6 || return 2
 }
 
 #
diff --git a/debian/tango-starter.init.d b/debian/tango-starter.init.d
index b4922aa..57a84a9 100644
--- a/debian/tango-starter.init.d
+++ b/debian/tango-starter.init.d
@@ -45,7 +45,7 @@ do_start()
         #   2 if daemon could not be started
 
         # first check for a running tango-database and
-        tango_admin --ping-database || 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
 

-- 
TANGO distributed control system.



More information about the debian-science-commits mailing list