12345678910111213141516171819 |
- #!/bin/bash
- # cd into the directory containing this script (from the bash faq 028)
- if [[ $BASH_SOURCE = */* ]]; then
- cd -- "${BASH_SOURCE%/*}/" || exit
- fi
- latency=30ms
- bw=100mbit
- if [ "$1" != "" ]; then
- latency="$1"
- fi
- if [ "$2" != "" ]; then
- bw="$2"
- fi
- ./unset-networking
- docker exec --privileged floram_p0 tc qdisc add dev eth0 root netem delay $latency rate $bw
- docker exec --privileged floram_p1 tc qdisc add dev eth0 root netem delay $latency rate $bw
|