asuswrt-merlin.ng/release/src-rt-5.02axhnd.675x/router-sysdep.rt-ax58u/stress/scripts/stress-xdslupdown.sh
Eric Sauvageau faefc269c3 SDK-6750: move RT-AX58U router-sysdep to model-specific folder, and copy appropriate model content to router-sysdep at build time
Symlinking doesn't work due to some shell tricks used in Makefiles
to extract info out of the current work directory.
2020-08-29 00:34:09 -04:00

47 lines
715 B
Bash

#!/bin/ash
i=0;
num_loops=10
if [ $1 != "" ]; then
echo "set num_loops to $1"
num_loops=$1
fi
echo "Do dsl up/down $num_loops times"
echo ""
while [ $i -lt $num_loops ]; do
i=`expr $i + 1`
echo "==== starting loop $i ====="
date
echo ""
echo ""
date
echo "===> bring link down with xdslctl connection --down and wait 30 seconds"
xdslctl connection --down
echo "return val = $?"
echo ""
sleep 15
echo "--15--"
sleep 15
date
echo "===> bring link up with xdslctl connection --up and wait 120 seconds"
xdslctl connection --up
echo "return val = $?"
echo ""
sleep 30
echo "--30--"
sleep 30
echo "--60--"
sleep 30
echo "--90--"
sleep 30
done
# if the system survives the test, then its a pass
echo "PASS"