X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=src%2Flibswift%2Fmfold%2Fdo-harvest.sh;fp=src%2Flibswift%2Fmfold%2Fdo-harvest.sh;h=7060705eb9cd3a6b497f0cc077ba4828085537f1;hb=45963a7511531cd1656ad5d3847d2dafd015c54d;hp=0000000000000000000000000000000000000000;hpb=d069796805ad79542fd7e4406d1e9c6d2d8c2ef7;p=swifty.git diff --git a/src/libswift/mfold/do-harvest.sh b/src/libswift/mfold/do-harvest.sh new file mode 100644 index 0000000..7060705 --- /dev/null +++ b/src/libswift/mfold/do-harvest.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# This script executes a chain of commands +# on all the member servers, in parallel. +# Commands are defined in .sh files (see +# docmd.sh); all failed executions are +# put to the FAILURES file +rm -f FAILURES + +if [ -z "$SERVERS" ]; then + SERVERS="das2.txt" +fi +HOSTS=`cat $SERVERS | awk '{print $1}'` + +for srv in $HOSTS; do + ( for cmd in $@; do + if ! ./docmd.sh $srv $cmd; then + echo $srv >> FAILURES + echo $src FAILED + break + fi + done ) & +done + +wait +echo DONE