[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]

Re: To ask a familiar question: auto-login of console connections

Chris Ross cross+conserver@distal.com
Sun, 2 Dec 2007 19:25:13 -0800 (PST)

On Nov 18, 2007, at 16:03, Bryan Stansell wrote:
that's exactly what will happen if you add the initcmd stuff to your
console definition (or what it inherits). it works for all types of
consoles. conserver will make the initial tcp connection, then fork off
the initcmd (pointing it's stdin/stdout to that file descriptor) and then
continue to do it's normal stuff when it exits.

Alright. I've finally gotten a couple hours to work on this. I started
by working with perl's Expect.pm, but since I'm not all that familiar
with it, I eventually gave up because I couldn't get it to work. It would
work alright if I used Expect->spawn("telnet A.B.C.D NN"), but I never
could get it to work with STDIN and STDOUT, the way it should work when
run as an initcmd.

  So, I dropped back to plain boring perl.  I'm just reading lines from
STDIN, and when I see the prompts I want, I'm printing things to STDOUT.
However, it doesn't seem to be working.  As far as I can tell, the
things I print to STDOUT aren't getting passed across the socket (in
this case, a connection "type host")

Do you have any suggestions of useful ways to get debugging information
out of the conserver process about the I/O of the initcmd, et al?


- Chris