[rancid] rancid 2.3.6: clogin with multiple devices fails... ($autologin not defined)

Lee ler762 at gmail.com
Thu Jul 14 00:10:51 UTC 2011

On 7/6/11, Jon Peatfield <J.S.Peatfield at damtp.cam.ac.uk> wrote:
> On Thu, 23 Jun 2011, Lee wrote:
>> Hi,
> <snip>
>>> <deathly quiet>
>>> So is this something specific to my copy of rancid, or is this just a
>>> well
>>> known thing to be avoided?
>> I'd never tried it before, so I stayed quiet :)   But it's easy enough
>> to test, so
>>  clogin -c "sh ip eigrp int"  router1 router2 router3 ... router20
>> worked for me using rancid 2.3.6
> As discussed off the list, it works ok if clogin isn't set to use enable
> ie if you have autoenable or noenable set.
> The bug seems is triggered if the $enable variable gets set, then the next
> time round the loop it calls code which references a variable which isn't
> defined (anywhere in the code).
> I can see a number of possible fixes to the current clogin code but would
> prefer an expert to take a look at it...

  ... crickets ...

OK, how 'bout a proposed fix?  Starting at my line 756 in clogin it's:
set enable 0
foreach router [lrange $argv $i end] {
    set router [string tolower $router]
    # attempt at platform switching.

Fix is to move the "set enable 0" line after the "foreach router [..." line.


More information about the Rancid-discuss mailing list