From 10585b27ea57f5c54ad97fab3b2f42d037c52e91 Mon Sep 17 00:00:00 2001 From: zelig Date: Fri, 29 Jul 2016 04:53:31 +0200 Subject: [PATCH] swarm/cmd: toynet bootstrap only 1 node/instance; fix checksum for dirs --- swarm/cmd/bootstrap-testnet.sh | 2 +- swarm/cmd/swarm/swarm | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/swarm/cmd/bootstrap-testnet.sh b/swarm/cmd/bootstrap-testnet.sh index 1735693d27..c1f217dcd7 100644 --- a/swarm/cmd/bootstrap-testnet.sh +++ b/swarm/cmd/bootstrap-testnet.sh @@ -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 diff --git a/swarm/cmd/swarm/swarm b/swarm/cmd/swarm/swarm index 27d3719588..7cb5dba2e9 100755 --- a/swarm/cmd/swarm/swarm +++ b/swarm/cmd/swarm/swarm @@ -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