|
Home > Archive > Unix Programming > November 2004 > Really weird expect problem
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Really weird expect problem
|
|
| Fletcher Glenn 2004-11-01, 5:53 pm |
| This may be somewhat long-winded, but after I explain the problem, I
must tell you everything that I have examined and tried.
First, the problem:
I'm working on a legacy expect script. This script is huge and
rewriting it is not an option. This script has worked successfully for
years, until I ran into a new situation at a customer site. When the
script telnets into the customer's HPUX machine, it does the strangest
echoing I have ever seen. If I send:
test string\r
I get in return:
test string\ntest string\r\n
Does anyone have any idea why this is happening?
At first glance it would seem that the shell is in echo or verbose mode,
except that I explicitly turn these things off. I've attempted
duplicating this problem locally, and I cannot. Even stranger, when you
telnet to the host from a command line, there's no problem, and you
don't get this strange double echo. If it helps any, the expect script
is operating telnet from a Windows 2000 machine.
One observation is that until the shell is started, everything works
normally - that is, there's no double echo of the username to the login
prompt (of course I can't tell about the password).
Things that I have examined and tried in order to duplicate the problem:
1. I've looked for strange environment variables.
2. I've looked at the parent/child path from inetd to my shell on the HP
machine.
3. I've looked at the shell's verbose and echo and insured that these
things are off.
4. I've determined that the problem is not in the local telnet program
because I've examined each and every telnet option both locally and in
the target machine.
5. I've looked at the tty settings and used the same settings in my
local shop on my HP machines. No luck. One point of interest is that
from the command line the HP machine sees the terminal as "ansi" and
from the expect program it sees the terminal as "unknown".
I'm flat out of ideas. Can anyone suggest something that I should be
examining?
--
Fletcher Glenn
| |
| Martin Carpenter 2004-11-01, 5:53 pm |
|
"Fletcher Glenn" <fletcher@removethisfoglight.com> wrote:
> I'm flat out of ideas. Can anyone suggest something that I
> should be examining?
Put ethereal or similar on your Windows box and see what's really coming
across the wire? At least you can then determine if it's telnetd or the
local client that is causing the problem.
| |
| Fletcher Glenn 2004-11-01, 5:53 pm |
|
Martin Carpenter wrote:
> "Fletcher Glenn" <fletcher@removethisfoglight.com> wrote:
>
>
>
>
>
> Put ethereal or similar on your Windows box and see what's really coming
> across the wire? At least you can then determine if it's telnetd or the
> local client that is causing the problem.
>
>
>
That's an outstanding suggestion,and I will try it, but an awful lot of
evidence points to the HP box.
Thanks,
--
Fletcher Glenn
|
|
|
|
|