HI AGAIN GUYS I AM NOW DOING THIS AND THE COMMANDS DONT SEEM TO BE GETTING EXECUTED ANY IDEAS??????????? TRHANKS
this meessege is getting resonded in the script;
RTNETLINK answers: File exists
#!/bin/bash
# define server
M3 SERVER 192.168.244.11
# don't run in anything but /opt
if [[ "$PWD" != "/opt" ]]; then
echo "This script must be run in /opt or not at all
"
exit
fi
# network delay 100mbs
echo "do you wish to slow down your network by 100"
echo "do you wish to slow down your network by 300"
echo "do you wish to slow down your network by 600"
echo "do you wish to slow down your network by 1000"
echo "do you wish to slow down your network by 2000"
read NETWORK
if [[ "$NETWORK" == "100" ]];then
tc qdisc add dev eth0 root netem delay 100ms
fi
if [[ "$NETWORK" == "300" ]];then
tc qdisc add dev eth0 root netem delay 300ms
fi
if [[ "$NETWORK" == "600" ]];then
tc qdisc add dev eth0 root netem delay 600ms
fi
if [[ "$NETWORK" == "1000" ]];then
tc qdisc add dev eth0 root netem delay 1000ms
fi
if [[ "$NETWORK" == "2000" ]];then
tc qdisc add dev eth0 root netem delay 2000ms
fi
# Run Network
echo "Do you wish to disable network delay y/n"
read DISABLE
if [[ "$DISABLE" == "Y" ]];then
`tc qdisc add dev eth0 root netem delay 0ms`
fi