aboutsummaryrefslogtreecommitdiff
path: root/src/dht/dhtu_testbed_connect.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/dht/dhtu_testbed_connect.sh')
-rwxr-xr-xsrc/dht/dhtu_testbed_connect.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/dht/dhtu_testbed_connect.sh b/src/dht/dhtu_testbed_connect.sh
new file mode 100755
index 000000000..871e9eb1b
--- /dev/null
+++ b/src/dht/dhtu_testbed_connect.sh
@@ -0,0 +1,31 @@
1#!/bin/bash
2# This file is in the public domain.
3
4# Helper script for dhtu_testbed_deploy.sh.
5# Do not invoke directly.
6
7n=$1
8CFG="/tmp/deployment/${n}.conf"
9HELLO=`gnunet-dht-hello -c $CFG`
10
11# Create dense topology:
12#for OFF in `seq 1 $MAX`
13#do
14# TCFG="/tmp/deployment/${OFF}.conf"
15# gnunet-dht-hello -c $TCFG $HELLO
16#done
17#exit 0
18
19# Create sparse topology:
20R=1
21while test `expr $R \* $R \* $R` -lt $MAX
22do
23 END=`expr $R \* $R`
24 for M in `seq $R $R $END`
25 do
26 OFF=`expr \( $n + $M \) % $MAX`
27 TCFG="/tmp/deployment/${OFF}.conf"
28 gnunet-dht-hello -c $TCFG $HELLO
29 done
30 R=`expr $R + 1`
31done