summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2021-08-17 20:37:50 +0200
committert3sserakt <t3ss@posteo.de>2021-08-17 20:37:50 +0200
commit48b633f2a47f47200fb72cca8d84b1f0c2d44ee0 (patch)
tree5d91e9191e3d4def1da30314818a8d9edf0deb73
parent32a8c505c1fa27bb43c4e7c8d288566d51417f56 (diff)
- moved additional files from testbed to testing
-rwxr-xr-xsrc/testbed/netjail_exec.sh16
-rwxr-xr-xsrc/testbed/netjail_start.sh52
-rwxr-xr-xsrc/testbed/netjail_stop.sh26
-rwxr-xr-xsrc/testing/netjail_core.sh (renamed from src/testbed/netjail_core.sh)0
-rwxr-xr-xsrc/testing/netjail_exec.sh2
-rwxr-xr-xsrc/testing/netjail_start.sh2
-rwxr-xr-xsrc/testing/netjail_stop.sh2
7 files changed, 3 insertions, 97 deletions
diff --git a/src/testbed/netjail_exec.sh b/src/testbed/netjail_exec.sh
deleted file mode 100755
index b76d2e444..000000000
--- a/src/testbed/netjail_exec.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-. "./../testbed/netjail_core.sh"
-
-set -eu
-set -x
-
-export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
-
-M=$1
-N=$2
-
-NODE=$(netjail_print_name "N" $N $M)
-
-
-
-netjail_node_exec_without_fds $NODE $3 $4 $5 $1 $2
diff --git a/src/testbed/netjail_start.sh b/src/testbed/netjail_start.sh
deleted file mode 100755
index 4c1c33c83..000000000
--- a/src/testbed/netjail_start.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/sh
-. "./../testbed/netjail_core.sh"
-
-set -eu
-set -x
-
-export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
-
-LOCAL_M=$1
-GLOBAL_N=$2
-
-# TODO: stunserver? ..and globally known peer?
-
-shift 2
-
-LOCAL_GROUP="192.168.15"
-GLOBAL_GROUP="92.68.150"
-
-NETWORK_NET=$(netjail_print_name "n" $GLOBAL_N $LOCAL_M)
-
-netjail_bridge $NETWORK_NET
-
-for N in $(seq $GLOBAL_N); do
- ROUTER=$(netjail_print_name "R" $N)
-
- netjail_node $ROUTER
- netjail_node_link_bridge $ROUTER $NETWORK_NET "$GLOBAL_GROUP.$N" 24
-
- ROUTER_NET=$(netjail_print_name "r" $N)
-
- netjail_bridge $ROUTER_NET
-
- for M in $(seq $LOCAL_M); do
- NODE=$(netjail_print_name "N" $N $M)
-
- netjail_node $NODE
- netjail_node_link_bridge $NODE $ROUTER_NET "$LOCAL_GROUP.$M" 24
- done
-
- ROUTER_ADDR="$LOCAL_GROUP.$(($LOCAL_M+1))"
-
- netjail_node_link_bridge $ROUTER $ROUTER_NET $ROUTER_ADDR 24
- netjail_node_add_nat $ROUTER $ROUTER_ADDR 24
-
- for M in $(seq $LOCAL_M); do
- NODE=$(netjail_print_name "N" $N $M)
-
- netjail_node_add_default $NODE $ROUTER_ADDR
- done
-done
-
-
diff --git a/src/testbed/netjail_stop.sh b/src/testbed/netjail_stop.sh
deleted file mode 100755
index 689bf7ae9..000000000
--- a/src/testbed/netjail_stop.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-. "./../testbed/netjail_core.sh"
-
-set -eu
-set -x
-
-export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
-
-LOCAL_M=$1
-GLOBAL_N=$2
-NETWORK_NET=$(netjail_print_name "n" $GLOBAL_N $LOCAL_M)
-
-shift 2
-
-for N in $(seq $GLOBAL_N); do
- for M in $(seq $LOCAL_M); do
- netjail_node_clear $(netjail_print_name "N" $N $M)
- done
-
- netjail_bridge_clear $(netjail_print_name "r" $N)
- netjail_node_clear $(netjail_print_name "R" $N)
-done
-
-netjail_bridge_clear $NETWORK_NET
-
-echo "Done"
diff --git a/src/testbed/netjail_core.sh b/src/testing/netjail_core.sh
index f49d4b312..f49d4b312 100755
--- a/src/testbed/netjail_core.sh
+++ b/src/testing/netjail_core.sh
diff --git a/src/testing/netjail_exec.sh b/src/testing/netjail_exec.sh
index b76d2e444..c20a8c117 100755
--- a/src/testing/netjail_exec.sh
+++ b/src/testing/netjail_exec.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-. "./../testbed/netjail_core.sh"
+. "./../testing/netjail_core.sh"
set -eu
set -x
diff --git a/src/testing/netjail_start.sh b/src/testing/netjail_start.sh
index 4c1c33c83..0984a3c42 100755
--- a/src/testing/netjail_start.sh
+++ b/src/testing/netjail_start.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-. "./../testbed/netjail_core.sh"
+. "./../testing/netjail_core.sh"
set -eu
set -x
diff --git a/src/testing/netjail_stop.sh b/src/testing/netjail_stop.sh
index 689bf7ae9..08f68cf7f 100755
--- a/src/testing/netjail_stop.sh
+++ b/src/testing/netjail_stop.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-. "./../testbed/netjail_core.sh"
+. "./../testing/netjail_core.sh"
set -eu
set -x