[rancid] Re: DONE: Implementation of the (generic) linux configuration backup-versioning DEVELOPMENT VERSION

Sam Munzani smunzani at comcast.net
Tue Jul 7 14:20:16 UTC 2009


Many companies don't allow root user for the SSH. So usually its login 
as normal user then either "su -" or "sudo su -". I think this script 
can be more useful if it considers non root logins.

My 2 cents.

> Hello to all,
> I finished modules for the archive of linux configuration.
> It's a development version so please dear developer support it in the main 
> trunk
> I wrote 2 modules:
> llogin
> lrancid
> ---------- LLOGIN --------------------
> llogin is based on clogin 2.3.2 script, try to login via ssh and telnet. It 
> should login as root.
> I did many modification to the clogin script, and I suppose a better check and 
> better diagnostic look.
> The point of view I started from is that linux normally stores configurations 
> as files in the filesystem, every distribution use its own directory structure 
> and often, an entire backup of /etc directory is too redundant so I added a 
> new configuration parameter in the .cloginrc and a new "MetaCommand" that is 
> BackupFiles that is runned by llogin script using .cloginrc files to feed it.
> The new parameter in the .cloginrc is "backupfile", so you need to add for 
> your linux machines at least a line in the .cloginrc file in the clogin 
> syntax:
> add backupfile <glob host identifier> <path/filename> [path/filename] ...
> if you want you can of course add new files in a new line; this is the reason 
> why I modified the clogin "add" procedure to feed correctly the 
> int_backupfiles global variable the llogin script is using.
> I wrote a new procedure that is send_debug that, when called with a string as 
> parameter, prints a gren "Debug:" followed by the string, if debug is on. 
> (this of course is to increment visibility of check strings along the expect 
> debug stream.
> --------- LRANCID ---------
> lrancid is a modified version of rancid 2.3.2 that calls llogin with the 
> BackupFiles metacommand as command argument.
> It have some hack to optimize the output of the llogin script, but is more or 
> less very similar to the rancid script
> ----------- rancid-fe -----------------
> I of course modified the rancid-fe script to manage a new device category that 
> is "linux".
> I'm attaching it to complete the contribution.
> ----------- sample .cloginrc ----------------------
> here is my cloginrc file part that is regarded to the linux machine:
>>>>>>>>>>>>> CUT >>>>>>>>>>>>>>
> add method linux.machine.domain ssh rlogin
> add user linux.machine.domain root
> add password linux.machine.domain thepassword thepassword
> add autoenable linux.machine.domain 1
> add backupfile linux.machine.domain /etc/issue 
> add backupfile linux.machine.domain /etc/network/interfaces
> #add backupfile linux.machine.domain /etc/network/interfaces
> <<<<<<<<<<<<<< CUT <<<<<<<<<<<<<<<<
> Hope this would help many of you
> Diego Ercolani
> ------------------------------------------------------------------------
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20090707/063a3374/attachment.html 

More information about the Rancid-discuss mailing list