Discussion:
unknown
1970-01-01 00:00:00 UTC
Permalink
it seems that the e30 behaves differently when there is a tty
attached, as when I add -nottycopy after the spawn in the login
script I get the same behavior on the cli as when it is run from cron
without the ttycopy option.
ie to get this behavior on the cli I changed
set retval [ catch {spawn telnet $router} reason ]
to
set retval [ catch {spawn -nottycopy telnet $router}
reason ]

Anyone here got any experience with devices that behave like this?
Or does anyone know the expect syntax to make rancid behave as if
there is a tty?

I'm reasonably sure it's a tty issue as I have manually set
environment variables such as TERM,COLUMNS,LINES etc. A packet trace
of the telnet session shows that when launched from cron the width
and height is set to zero when it negotiates the window size.

http://expect.nist.gov/FAQ.html#q26 implies there is a way to do this
but helpfully you have to buy their book.

http://www.issociate.de/board/post/181281/%22expect%
22_spawns_telnet_--_screen_height.html seems to solve a very similar
issue in a perl script.

Any ideas?

Thanks
--
| Mark Loveley Broadband Solutions for
| Network Engineer home and business
| PlusNet PLC @www.plus.net
| Registered Office: Internet House, 2 Tenter Street, Sheffield, S1 4BY
| Registered in England no: 3279013
+ ------------ PlusNet - The smarter way to broadband ----------------+
Loading...