[rancid] How to implement a diff filter?

James Bensley jwbensley at gmail.com
Thu Sep 5 10:05:40 UTC 2013

Better late than never ;)

Thanks to everyone for your input on this, the info provided was
exactly the direction I needed.

I have implemented a diff filter now. It's very basic but that's all
it needed to be. I wanted my rancid update emails to change from this
[1], to this [2]. So any section where there wasn't a configuration
change, don't tell me about it (although do commit it to the

The simple pattern here is that updates without config changes have
the same number of line start with "-" and "- !" and the same number
of lines starting with "+" and "+ !". The script simple uses sed to
cut out sections from the email update diff file that match this
simple pattern. The script is here;

As pointed out, you need to make a minor modification to
control_rancid in bin/ directory to call the filter script. Thanks
again everyone, you have aided me in the never ending battle of
reducing the number of emails I receive!


[1] http://pastebin.com/raw.php?i=hJX2mrmX
[2] http://pastebin.com/raw.php?i=FMY5C6dp

More information about the Rancid-discuss mailing list