Improvs.
[anna.git] / example / diameter / launcher / deployments / st-client / operation_all.sh
index e2efaa4..1304dfd 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# touch .operation_background to force background execution of every ADML instances operations "broadcasted"
 cd `dirname $0`
 if [ ! -d "ADMLS" ]
 then
@@ -8,14 +9,23 @@ then
   exit 1
 fi
 
+BGROUND=
+[ -f .operation_background ] && BGROUND=yes
+
 for op in `ls ADMLS/*/operation.sh`
 do
   dn_op=`dirname $op`
   cd $dn_op
   echo -n "Instance `basename $dn_op`: "
   0>launcher.trace
-  ./operation.sh $@
-  [ $? -ne 0 ] && { echo ; exit 1 ; }
+  if [ -n "$BGROUND" ]
+  then
+    ./operation.sh $@ &
+    sleep 0.01
+  else
+    ./operation.sh $@
+     [ $? -ne 0 ] && { echo ; exit 1 ; }
+  fi
   cd - >/dev/null
 done