swarm/cmd: toynet bootstrap only 1 node/instance; fix checksum for dirs

This commit is contained in:
zelig 2016-07-29 04:53:31 +02:00
parent 85d0e34702
commit 10585b27ea
2 changed files with 6 additions and 2 deletions

View file

@ -7,7 +7,7 @@ swarm remote-update-scripts nodes.lst
swarm remote-update-bin nodes.lst
# spawn a 2-instance local cluster on each of our 10 host nodes
swarm remote-run nodes.lst 'swarm init 2; swarm netstatconf sworm; swarm netstatrun'
swarm remote-run nodes.lst 'swarm init 1; swarm netstatconf sworm; swarm netstatrun'
#collect enodes from all instances on all hosts
swarm remote-run nodes.lst 'swarm enode all' | tr -d '"' |grep -v running > enodes.lst

View file

@ -638,7 +638,11 @@ function checkdownload {
elif [ -r $target ]; then
diff -r $target $dest >/dev/null && echo PASS || echo FAIL
else
exp=`checksum $dest/*`
if [ `ls -1 $dest|wc -l` = "1" ]; then
exp=`checksum $dest/*`
else
exp=`checksum $dest`
fi
if [ "$exp" = "$target" ]; then
echo -n PASS
else