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

Picca Frédéric-Emmanuel picca at synchrotron-soleil.fr
Fri Jan 21 05:41:34 UTC 2011


The following commit has been merged in the master branch:
commit 7905acf486a2b80a62203aa75046dd6c95149003
Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
Date:   Thu Jan 20 14:22:22 2011 -0500

    * update the tango-db init.d scripts for computers connected via wifi
    
    wait long for network-manager to setup a working network.
    no need to wait when the TANGO_HOST is the localhost
    thank manu taurel for this script and the tests at the esrf.

diff --git a/debian/tango-db.init.d b/debian/tango-db.init.d
index 7d42619..c6fa558 100644
--- a/debian/tango-db.init.d
+++ b/debian/tango-db.init.d
@@ -22,8 +22,9 @@ NAME=tango-db
 NAME_REAL=DataBaseds
 CONFFILE=/etc/tangorc
 PORT=`grep TANGO_HOST $CONFFILE | awk -F ":" '{print $2}'`
+HOST=`grep TANGO_HOST $CONFFILE | awk -F ":" '{print $1}' | awk -F "=" '{print $2}'`
+CANON_HOST=`grep TANGO_HOST $CONFFILE | awk -F ":" '{print $1}' | awk -F "=" '{print $2}' | awk -F "." '{print $1}'`
 DAEMON=/usr/lib/tango/$NAME_REAL
-DAEMON_ARGS=" 2 -ORBendPoint giop:tcp::$PORT"
 PIDFILE=/var/run/$NAME.pid
 
 # Exit if the package is not installed
@@ -49,7 +50,13 @@ do_start()
 	#   2 if daemon could not be started
 
 	# to start this daemon need a working network
-	tango_admin --ping-network 4 || return 2
+	if [ $CANON_HOST = "localhost" ]
+	then
+		DAEMON_ARGS="2 -ORBendPoint giop:tcp:$HOST:$PORT"
+	else
+		DAEMON_ARGS="2 -ORBendPoint giop:tcp::$PORT"
+		tango_admin --ping-network 45 || return 2
+	fi
 	start-stop-daemon --start --quiet --chuid tango:tango --background \
 	    --make-pidfile --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
 	    || return 1

-- 
TANGO distributed control system.



More information about the debian-science-commits mailing list