Hi,

On 09/11/2014 10:24 AM, Hangbin Liu wrote:
> Some systems use biosdevname instead of ethX now. So add a global variable
> INTERFACE for networktest.sh which can make us use other NIC name in all 
> scripts.
>
> v2: use INTERFACE to be same with networkstress.sh
>
> Signed-off-by: Hangbin Liu <liuhang...@gmail.com>
> ---
>   testscripts/networktests.sh | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/testscripts/networktests.sh b/testscripts/networktests.sh
> index b136749..210257e 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 INTERFACE=${INTERFACE:-"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: $INTERFACE)"
>       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) INTERFACE=${OPTARG};;
>       V|v) VERBOSE="yes";;
>       H|h) usage; exit 0 ;;
>       *) echo "Error: invalid option..."; usage; exit 1 ;;

I'd like to apply network configuration patch 
(http://sourceforge.net/p/ltp/mailman/message/32683953/) which is adding 
two interface variables: RHOST_INTERFACE and LHOST_INTERFACE. It'll 
allow to set all network configuration parameters in one file, 
network.sh. Do you agree/disagree with that changes?

Thanks,
Alexey


------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to