RANCID-CONTENT-TYPE Reporting...
john heasley
heas at shrubbery.net
Tue Jun 14 22:01:30 UTC 2005
Tue, Jun 14, 2005 at 05:14:29AM -0700, Roderick B. Greening:
> Has anyone written a script to extract the RANCID-CONTENT-TYPE values
> (comments) from the header of the config files to provide reporting on the
> backed up inventory?
>
> I'd like to have a record in a single file that shows what devices I have,
> versions of software, etc. I figure someone must have hacked together
> something to provide this.
>
> Thanks.
This ought to be a simple wrapper around grep. basically
cd ~rancid
. etc/rancid.conf
for group in $LIST_OF_GROUPS; do
( cd $group/configs
for device in *
egrep '(RANCID-CONTENT-TYPE| ...)' $device > $logfile
...
More information about the Rancid-discuss
mailing list