[rancid] Re: Rancid stopped working for my HP switches

Per-Olof Olsson peo at chalmers.se
Sat Apr 3 05:59:18 UTC 2010


I

There is some update for code using ssh!. Isn't there missing the 
"hpuifilter" to clean some terminal escape codes.

After adding "hpuifilter --" I start to get output/updates in files.


< set retval [ catch {eval spawn [split "$cmd -c $cyphertype -x -l $user 
$router" { }]} reason ]

> set retval [ catch {eval spawn [split "hpuifilter -- $cmd -c $cyphertype -x -l $user $router" { }]} reason ]
-----------------------------------------^^^^^^^^^^^^^^


## $Id: hlogin.in 2162 2010-03-15 21:20:31Z heas $
----------------------------------------------------
---> diff hlogin.in.ORG hlogin.in
220,222c220,221
<           # hp does not autoenable
<           #set autoenable 1
<           #set avenable 0
---
>           set autoenable 1
>           set avenable 0
316c315
< proc login { router user userpswd passwd enapasswd cmethod cyphertype } {
---
> proc login { router user userpswd passwd enapasswd cmethod cyphertype identfile } {
342c341,344
<           set retval [ catch {eval spawn [split "$cmd -c $cyphertype 
-x -l $user $router" { }]} reason ]
---
>           if {"$identfile" != ""} {
>               set cmd "$cmd -i $identfile"
>           }
>           set retval [ catch {eval spawn [split "hpuifilter -- $cmd -c $cyphertype -x -l $user $router" { }]} reason ]
603a606,608
>     # device identfile for ssh public key login
>     set identfile [join [lindex [find identity $router] 0] ""]
>
720c725
<     if {[login $router $ruser $userpswd $passwd $enapasswd $cmethod 
$cyphertype]} {
---
>     if {[login $router $ruser $userpswd $passwd $enapasswd $cmethod $cyphertype $identfile]} {
-----------------------------------------------------

Comment:
For new switches hp do autoenable
Also used to add loggin via ssh public/private keys in my hlogin
(No password/passphrase in .cloin. Part of code copyed from jlogin.)

James Zuelow skrev 2010-04-03 02:11:
>
>
>> -----Original Message-----
>> From: rancid-discuss-bounces at shrubbery.net
>> [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of
>> David Krider
>> Sent: Friday, 02 April, 2010 11:55
>> To: rancid-discuss at shrubbery.net
>> Subject: [rancid] Re: Rancid stopped working for my HP switches
>>
>
>>
>> Just for the record, I tried it both ways, and my Procurves seem to do
>> alright with leaving that "terminal length" line alone.
>>
>
> Mine don't.  I don't get any configs at all if I leave that in.
>
> It's just another example of how my rancid doesn't appear to act like anyone else's rancid, even though all I'm doing is installing the package.  Or maybe I've got knockoff Procurves.  :)
>
>
> James Zuelow
> Network Specialist
> City and Borough of Juneau MIS (907)586-0236
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss


/Peo
----------------------------------------------------------
Per-Olof Olsson               Email: peo at chalmers.se
Chalmers tekniska högskola    IT-service
Hörsalsvägen 5                412 96 Göteborg
Tel: 031/772 6738  Fax: 031/772 8680
----------------------------------------------------------


More information about the Rancid-discuss mailing list