[rancid] Re: ignore certain diff's
Ed Ravin
eravin at panix.com
Wed May 24 19:14:07 UTC 2006
On Wed, May 24, 2006 at 09:11:56AM -0700, Ryan Speed wrote:
> I've got rancid checking a few cisco routers running Callmanager
> Express which has turned out to be a bit of an annoyance because when
> people forward their phones I get the diff emails sent out. Before I
> go hacking away at the scripts could someone suggest an elegant way to
> add exceptions to the emailing of diffs?
Assuming GNU diff, you could use something like this:
DIFFSUPPRESSOPTS="-b -I '^ntp clock-period [0-9][0-9]*' -I '^! Last configuration change ' -I '^! NVRAM config last updated '"
The above is a fragment from a non-RANCID script I have that manipulates
the routers. The -I (or --ignore-matching-lines) option specifies patterns
that diff will ignore if the differences in that line match the specified RE.
I'm sure with judicious use of one or two shell variables, we could have
settings in rancid.conf to allow various kinds of fine-tuning of the diff
listing that RANCID mails out.
More information about the Rancid-discuss
mailing list