Diego Ercolani
2009-07-07 13:50:28 UTC
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 ----------------------
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
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 ----------------------
CUT >>>>>>>>>>>>>>
add method linux.machine.domain ssh rloginadd 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