Some systems use biosdevname instead of ethX now. So add a global variable
TEST_IFACE for networktests.sh which can make us use other NIC name in all
scripts.
---
testscripts/networktests.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/testscripts/networktests.sh b/testscripts/networktests.sh
index b136749..660392a 100755
--- a/testscripts/networktests.sh
+++ b/testscripts/networktests.sh
@@ -4,6 +4,7 @@
# ---***** THESE MUST BE SET FOR CORRECT OPERATION *****---
export RHOST=
export PASSWD=
+export TEST_IFACE=${TEST_IFACE:-"eth0"}
# ---***************************************************---
cd `dirname $0`
@@ -51,6 +52,7 @@ usage() {
echo " -R|r: rpc tests"
echo " -S|s: sctp tests"
echo " -T|t: TCP/IP command tests"
+ echo " -I|i: Test interface (default: $TEST_IFACE)"
echo " -V|v: Enable verbose"
echo " -H|h: This Usage"
echo "*) 'default' runs multicast, rpc, nfs and some of TCP/IP command"
@@ -60,7 +62,7 @@ usage() {
# Parse options
CMD=0
-while getopts WwDd6LlMmNnRrSsTtVvHh OPTION
+while getopts WwDd6LlMmNnRrSsTtI:i:VvHh OPTION
do
case $OPTION in
W|w) CMD=$CMD_WHOLE;;
@@ -72,6 +74,7 @@ do
R|r) CMD=$(($CMD|$CMD_RPC));;
S|s) CMD=$(($CMD|$CMD_SCTP));;
T|t) CMD=$(($CMD|$CMD_TCPCMDS|$CMD_TCPCMDS_ADD));;
+ I|i) TEST_IFACE=${OPTARG};;
V|v) VERBOSE="yes";;
H|h) usage; exit 0 ;;
*) echo "Error: invalid option..."; usage; exit 1 ;;
--
1.9.3
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list