[rancid] Re: [Fwd: Re: rancid & mysql]

Ed Ravin eravin at panix.com
Tue Mar 21 21:56:41 UTC 2006


On Tue, Mar 21, 2006 at 01:02:34PM -0700, Justin Grote wrote:
> Everything in rancid is pretty much scripts written in perl, shell, and 
> expect except for one hp-specific binary.
...
>  you could simply write a script in any language of 
> your choice that generates a .cloginrc file from the mysql table, and 
> sticks that in the rancid homedir, and then set up a cron job to run the 
> script every 5 minutes.

Alternatively, since .cloginrc is executed by clogin, you could put Expect
code in there to create a password file from the mysql table in .cloginrc,
then source that output file to load in the passwords.  Or to be really
elegant, parse the argv vector (shown below in a code excerpt from clogin)
so you could just load in the passwords you need for the run.

  #
  # For each router... (this is main loop)
  #
  source_password_file $password_file
  set in_proc 0
  foreach router [lrange $argv $i end] {
  [...]




More information about the Rancid-discuss mailing list