[rancid] Re: Custom devices and ttys
heas at shrubbery.net
Wed Oct 10 17:09:16 UTC 2007
Wed, Oct 10, 2007 at 12:22:41PM +0100, Mark Loveley:
> On 9 Oct 2007, at 18:40, john heasley wrote:
> >I think you've identified the problem correctly, the screen height
> >of zero
> >affecting a broken pager. Normally rancid sets the TERM to
> >"network" in
> >rancid.conf, which implies a height of 0. AND, clogin sends the
> >'term length 0' to disable the pager. Assuming your device does not
> >recognize the 'term length' command, try setting TERM to something
> >normally has a fixed height, such as vt100.
> Unfortunately I had already tried vt100 as a TERM type. My issue is
> that when launched from cron it doesn't even get to disabling the pager.
> from the command line It reads the banner, matches the login prompt
> "Login:", sends my username, matches the password prompt "Password:"
> and sends my password, and gets logged in.
> from cron it matches the login prompt, but the device never prints
> the password prompt, just a "Press any key to continue (Q to quit)",
> if thats matched it sends "any key" and gets the same prompt back.
> So when connecting via cron I never get the chance to disable the
> pager (btw on this system the command needed is "no more" which is
> why I created a custom login script called e30login).
> >Another possibility is to use hlogin, which has become somewhat the
> >of the bastard children, with the addition of a stty command to
> >the height to something greater than 0. Note that hlogin also
> >tries to
> >disable the pager with HP's 'no page' command.
> hlogin seems to spawn hpuifilter which I assume only strips nasty
> control characters.
> Using this from the command line I've no yet managed to get it to login.
tried hlogin or hpuifilter? try hlogin, which allocates a pty for
> How do you suggest using stty to set the height? See my previous
> email for examples for failures using that from cron.
As david luyer said, spawn should allocate a pty for you, which should
give you a controlling terminal. so, I think that
stty whatever > spawn_out(slave,name)
will affect the slave (telnet/ssh) side of the pty
More information about the Rancid-discuss