blob: 753c0470f0d3814e5d951aebebcf0c78b8e1a3ce [file] [log] [blame]
Brenden Blancoa1b882d2015-06-24 18:31:14 -07001#!/bin/bash
2
3cmd="ip netns exec host0"
4if [[ "$(id -u)" != "0" ]]; then
5 cmd="sudo $cmd"
6fi
7
8B=/usr/bin/byobu
9S=tunnel1
10
11tmux has-session -t $S &> /dev/null
12
13if [[ $? != 0 ]]; then
14 $B new-session -s $S -n "c1" -d
15 tmux send -t $S "$cmd ping 192.168.0.1 -s512" C-m
16 tmux new-window -t $S -n "c2"
17 tmux send -t $S "$cmd ping 192.168.0.2 -s128" C-m
18 tmux new-window -t $S -n "c3"
19 tmux send -t $S "$cmd ping 192.168.0.3 -s1024" C-m
20 tmux new-window -t $S -n "c3"
21 tmux send -t $S "$cmd ping 192.168.0.4 -s128" C-m
22 tmux new-window -t $S -n "c3"
23 tmux send -t $S "$cmd ping 192.168.0.5 -s128" C-m
24 tmux new-window -t $S -n "c3"
25 tmux send -t $S "$cmd ping 192.168.0.6 -s128" C-m
26 tmux new-window -t $S -n "c4"
27 tmux send -t $S "$cmd ping 192.168.1.2 -s128" C-m
28 tmux new-window -t $S -n "c5"
29 tmux send -t $S "$cmd ping 192.168.1.4 -s768" C-m
30 tmux new-window -t $S -n "c2"
31 tmux send -t $S "$cmd ping 192.168.2.2 -s128" C-m
32 tmux new-window -t $S -n "c3"
33 tmux send -t $S "$cmd ping 192.168.2.7 -s1024" C-m
34 tmux new-window -t $S -n "c4"
35 tmux send -t $S "$cmd ping 192.168.2.2 -s128" C-m
36 tmux new-window -t $S -n "c5"
37 tmux send -t $S "$cmd ping 192.168.3.8 -s768" C-m
38 tmux new-window -t $S -n "c5"
39 tmux send -t $S "$cmd ping 192.168.3.9 -s768" C-m
40fi
41
42exec tmux attach -t $S
43