Hi. I think I have found a probable (and relatively minor) bug in one of 
the LTP networking scripts, and I suggest a quick and easy fix. I'm an 
LTP n00b, so sorry if this question is not germane to this mailing list 
- I will repost somewhere else if you tell me where.

The 'ltp-full-xyz/testcases/bin/rusers01' script has this line, which I 
think is problematic:
RHOST=`echo $RHOST | cut -d. -f1`

As I understand it, this line is cutting the RHOST value to the first 
occurrence of "." in RHOST. So, if my RHOST was "box034.mydomain.com 
"box034.mydomain.com" it will be simply "box034" after the command is 
executed. I am guessing the cut command above assumes that RHOST is set 
to something like "myhost.mydomain.com " in which case it works fine and 
the rusers01 script also works fine.

However, when I have RHOST exported as an IP address like "172.17.1.34", 
the test fails because the above command cuts the IP to "172" and RHOST 
(172) is therefore unreachable.

I think the
RHOST=`echo $RHOST | cut -d. -f1`
line is unnecessary in the script: the script works fine for me (all 
tests pass) when I comment it out (with RHOST set or unset). So removing 
this line from the script is a quick quickfix (and works even when RHOST 
is set to an IP address).

I have been going through the other LTP networking scripts and none of 
the others I have so far encountered use a cut command like rusers01, so 
I am a bit puzzled as to what it's really for, and if it's really needed 
here... :)

Comments will be much appreciated.

Sincerely,
Ambar

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to