diff options
Diffstat (limited to 'cpp/src/tests/start_cluster')
| -rwxr-xr-x | cpp/src/tests/start_cluster | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cpp/src/tests/start_cluster b/cpp/src/tests/start_cluster index 876913bc2d..46ecbad9c5 100755 --- a/cpp/src/tests/start_cluster +++ b/cpp/src/tests/start_cluster @@ -3,6 +3,12 @@ # Print the cluster's URL. # +# Execute command with the ais group set. +with_ais_group() { + id -nG | grep '\<ais\>' >/dev/null || { echo "You are not a member of the ais group."; exit 1; } + echo $* | newgrp ais +} + test -f cluster.ports && { echo "cluster.ports file already exists" ; exit 1; } test -z "$*" && { echo "Usage: $0 cluster-size [options]"; exit 1; } @@ -13,7 +19,7 @@ CLUSTER=`whoami` # Cluster name=user name, avoid clashes. OPTS="--load-module ../.libs/libqpidcluster.so -dp0 --log-output=cluster$i.log --cluster-name=$CLUSTER --no-data-dir --auth=no $*" for (( i=0; i<SIZE; ++i )); do - PORT=`../qpidd $OPTS` || exit 1 + PORT=`with_ais_group ../qpidd $OPTS` || exit 1 echo $PORT >> cluster.ports done |
