[rancid] Re: Ignoring certain diffs

Lance Vermilion rancid at gheek.net
Wed Nov 19 17:47:52 UTC 2008


If you don't want the flash stuff you could always very simply remove
it from the collection. Most people that I have seen ask that question
do that.

open the corresponding rancid file "for cisco open:
<rancid_home>/bin/rancid" and then search for "commandtable". Comment
out the commands you don't really care for.

A much more ideal solution would be some nice regex during the
collection period that would remove the file size or date/time stamp.
I don't have time at the moment to look at that, but maybe someone
else does and they can offer it up to John to include.

-Lance

On Wed, Nov 19, 2008 at 10:09 AM, Eric Cables <ecables at gmail.com> wrote:
> Anyone?
>
> On Mon, Nov 17, 2008 at 9:39 AM, Eric Cables <ecables at gmail.com> wrote:
>> I went through the archives, and implemented one of the solutions for
>> ignoring diffs (such as call-forward, etc.).
>>
>> I implemented it as follows in control_rancid:
>> <-- snippit -->
>> if [ $RCSSYS = "cvs" ] ; then
>> DIFFSUPPRESS="-I '.*call-forward.*' -I '.*Flash.*nvram.*'"
>>
>>     cvs -f diff -u -4 -ko $DIFFSUPPRESS \
>>         | sed -e '/^RCS file: /d' -e '/^--- /d' \
>>         -e '/^+++ /d' -e 's/^\([-+ ]\)/\1 /' >$TMP.diff
>> else
>>     svn diff | sed -e '/^+++ /d' -e 's/^\([-+ ]\)/\1 /' >$TMP.diff
>> <-- snippit -->
>>
>>
>> Unfortunately this doesn't seem to have worked.  I checked my RANCID e-mail
>> this morning and it shows the following:
>>
>> Index: configs/<hostname>
>> ===================================================================
>> retrieving revision 1.4
>> diff -u -4 -I ''\''.*call-forward.*'\''' -I ''\''.*Flash.*nvram.*'\''' -r1.4
>> <hostname> @@ -26,16 +26,16 @@
>>   !Flash: nvram: Directory of nvram:/
>> - !Flash: nvram:   230  -rw-        7166                    <no date>
>> startup-config
>> + !Flash: nvram:   230  -rw-        7127                    <no date>
>> startup-config
>>   !Flash: nvram:   231  ----        3867                    <no date>
>> private-config
>> - !Flash: nvram:   232  -rw-        7166                    <no date>
>> underlying-config
>> + !Flash: nvram:   232  -rw-        7127                    <no date>
>> underlying-config
>>
>> It looks like it should have ignored any lines with "Flash: nvram", yet they
>> are still showing up.
>>
>> Can anyone please provide a second set of eyes and help me figure out what
>> I've done wrong?
>>
>> Thanks,
>>
>>
>> --
>> Eric Cables
>>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
>


More information about the Rancid-discuss mailing list