RANCID's fantastic!

Andrew Pollock rancid-andrew at andrew.net.au
Thu Jan 22 01:10:40 UTC 2004


On Thu, Jan 22, 2004 at 11:06:52AM +1100, Andrew Fort wrote:
> On 22/01/2004 10:33 AM, Andrew Pollock wrote:
> 
> >Okay, I'm now having a serious play with RANCID, and I'd like to see it do
> >the out of band stuff I mentioned a while ago (i.e. we have switches,
> >they're not telnetable, but the console is accessible via SSH to a Cyclades
> >console access server).
> >
> >Can someone point me in the right direction as to what I'd have to modify 
> >to
> >implement this?
> >
> 
> Referring to Heas' previous reply to your post to the list, to add the
> 'loginscript' or 'connectscript' type of functionality, one would need
> to hack the *login scripts.
> 
> You could start by hacking clogin (if cisco switches are your targets,
> obviously), modifying the procedure 'login'.  At first glance, you're
> probably wanting to source another expect script before the line

[snip]

Thanks for the very detailed pointer. That helps get me started.

The way I have our Cyclades setup is you can SSH to it thusly:

ssh andrew:switch1 at mycyclades
or
ssh -l andrew:switch1 mycyclades

and you'll land straight onto the console port in question. Obviously you
need to send a ~. to get off again. So you don't spend any time on the
console server itself.

Is it best to hack in a new method along the lines of "cas" and a have a cas
user and password in cloginrc? Then the foreach loop of the login procedure
would just do nothing if the method was cas, and I'd be conditionally
sourcing another script prior to the foreach that handles connecting to the
port if the method was cas. Then the rest of the login procedure should be
able to cope from there. I guess I'd just have to handle disconnecting from
the port then somewhere as well.

regards

Andrew



More information about the Rancid-discuss mailing list