When I ran the network tests, I got the following error:
/usr/local/ltp/testcases/bin/finger01: [: -ne: unary
operator expected
After poking around in finger01, I found the following:
FINGER=`netstat -a | grep "*:finger" |awk '{print $6}'`
if [ $FINGER -ne "LISTEN" ]; then
If the finger service isn't running, the FINGER
variable will have a value of nothing, so the if
statement will expand to:
if [ -ne "LISTEN" ]; then
When I fixed that error, I got another error on the
same line:
/usr/local/ltp/testcases/bin/finger01: [: LISTEN:
integer expression expected
"-ne" is for integer expressions, "!=" is for string
expressions.
The attached patch fixes two instances of these errors
in finger01.
Robert Williamson
Testcases
TCP Commands
Public
|
Date: 2003-08-13 12:51:23 PDT Logged In: YES |
| Filename | Description | Download |
|---|---|---|
| patch | finger01 patch | Download |
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Closed | 2005-02-07 11:41:24 PST | robbiew |
| status_id | Open | 2003-08-13 12:51:23 PDT | robbiew |
| resolution_id | None | 2003-08-13 12:51:23 PDT | robbiew |
| close_date | - | 2003-08-13 12:51:23 PDT | robbiew |
| assigned_to | nobody | 2003-08-13 12:48:44 PDT | robbiew |
| File Added | 58651: patch | 2003-08-13 12:32:27 PDT | drsmith2 |