[rancid] Minor fix/update for hlogin ( and *login?).

Per-Olof Olsson peo at chalmers.se
Mon Mar 4 15:35:54 UTC 2013


On 03/01/2013 07:26 PM, heasley wrote:
> Wed, Feb 27, 2013 at 08:47:30AM +0100, Per-Olof Olsson:
>> Hello
>>
>>
>> Testing some minor update for hlogin (rancid 2.3.8).
>>
>> Sometimes I use hlogin to login to switches but get the session filtered by
>> hpuifilter. A bit hard to work with that output. I think this helps.
> 
> I've always liked that it didnt mess with my terminal; ie: truncate it to
> 24 lines.  but, ok; committed.
> 
Yes, good old HP2524 and HP41xx switches using 24 lines window.

New switches try to probe window size at login so it works well,
using proper window size.

>> rancid at host bin]$ diff -c hlogin.in_ORG hlogin.in
>> *** hlogin.in_ORG       2013-01-21 07:05:47.357345221 +0100
>> --- hlogin.in   2013-02-27 07:56:51.332898135 +0100
>> ***************
>> *** 328,336 ****
> 	...
> 
>> Testing to set negative port number to telnet shows that it don't work on RHlinux
>> (from "man cloginrc" " Example: add method * {ssh} {telnet:-3000} {rsh}").
>>
>> Tested "add method <hostname> {telnet:-23}"
>>
>> -----------------------
>> $ telnet <hostname> -23
>> telnet: invalid option -- '2'
>> Usage: telnet [-8] [-E] [-L] [-S tos] [-a] [-c] [-d] [-e char] [-l user]
>>         [-n tracefile] [-b hostalias ] [-r]
>>  [host-name [port]]
>> --------------------
>>
>> I have to add "--" to telnet args in hlogin,  "telnet -- $router $port"
>>
>> or used positive port number and put
>> ----------------------
>> DEFAULT
>> 	mode character
>> ----------------------
>> or
>> ----------------------
>> <hostname>
>> 	mode character
>> ----------------------
>> in ~/.telnetrc
>>
>>
>> Is telnet special for RHlinux or update needed for telnet in all *login scripts
>> and/or add some notes in man page for cloginrc about ~/.telnetrc?
> 
> I dont remember which client required the -; could have been BSD/OS.  removed.
> 
> there is a note in the page referring to telnetrc; I dont want to duplicate the
> manpage there, I would surely get it wrong or miss nuances of particular
> implementations.
> 

After I look in manuals ones more, I think all info needed is there.

It's best to restrict and not use options like "--" and negative port number to telnet
command, before tested it on all platforms.

Just recomend use of ~/.telnetrc to get "character mode", if port number is used.


/Peo





More information about the Rancid-discuss mailing list