Hi!
On 09/09/2014 03:59 PM, chru...@suse.cz wrote:
> Hi!
>> --- a/testscripts/networkstress.sh
>> +++ b/testscripts/networkstress.sh
>> @@ -12,32 +12,10 @@ if [ $? -eq 0 ]; then
>>    export LTPROOT=${PWD}
>>   fi
>>   
>> -export TMPDIR=/tmp/netst-$$
>> -mkdir $TMPDIR
>> -VERBOSE="no"
>> -INTERFACE="eth0"
>> -
>> -#===========================================================================
>> -# Network parameters
>> -export RHOST=
>> -export RHOST_HWADDRS=
>> -export HTTP_DOWNLOAD_DIR=
>> -export FTP_DOWNLOAD_DIR=
>> -export FTP_UPLOAD_DIR=
>> -export FTP_UPLOAD_URLDIR=
>> -
>> -# Set firt three octets of the network address, by default 10.0.0
>> -export IPV4_NETWORK=
>> -# Set local host last octet, by default 2
>> -export LHOST_IPV4_HOST=
>> -# Set remote host last octet, by default 1
>> -export RHOST_IPV4_HOST=
>> -# Set the reverse of IPV4_NETWORK, by default 0.0.10
>> -export IPV4_NETWORK_REVERSE=
>> +. $LTPROOT/testscripts/network.sh $0
> Is the $0 parameter actually used? I couldn't find line in the
> network.sh where script parameters are parsed.

You're right, I guess it was left from some of the previous versions, 
where I wanted to move 'LTPROOT' setting to network.sh. But now, I think 
It can be done as follows:

$ cat networkstress.sh
...
cd $(dirname $0)
. ./network.sh
...

$ cat network.sh
...
export LTPROOT=${PWD}
echo $LTPROOT | grep testscripts > /dev/null 2>&1
if [ $? -eq 0 ]; then
  cd ..
  export LTPROOT=${PWD}
fi
...

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