23 Sep 2010 01:16
Re: [rancid] post-processing the diff listing before mailing?
Chris Gauthier <cgauthier <at> mapscu.com>
2010-09-22 23:16:22 GMT
2010-09-22 23:16:22 GMT
I do like the idea of that quite a bit. I intentionally turn off the masking in the repository, but prefer it
not be mailed out. Perhaps that should just be the default setting? In any event, I like the concept a lot.
Chris G.
-----Original Message-----
From: rancid-discuss-bounces <at> shrubbery.net [mailto:rancid-discuss-bounces <at> shrubbery.net] On
Behalf Of Lee
Sent: Wednesday, September 22, 2010 10:04 AM
To: rancid-discuss <at> shrubbery.net
Subject: [rancid] post-processing the diff listing before mailing?
Anyone like the idea of processing the diff listing before mailing it out?
I'd rather have rancid collect the configs and not mess with them -
ie: rancid.conf has
FILTER_PWDS=NO
NOCOMMSTR=NO
ACLSORT=NO
but I don't want things like SNMP community strings or encrypted/obfuscated passwords being mailed out..
So my idea is post-processing the diff listing before emailing it out. Which would also let me know which
configs changed so I could check the new configs & mail out a 'local config standards violations' email :)
The code is really ugly, but as a proof of concept..
"control_rancid" line 447
# This has been different for different machines...
# Diff the directory and then checkin.
trap 'rm -fr $TMP $TMP.diff $DIR/routers.single;' 1 2 15 cd $DIR if [ $RCSSYS = "cvs" ] ; then
# --LR-- cvs -f diff -U 4 -ko | sed -e '/^RCS file: /d' -e '/^--- /d' \
(Continue reading)
RSS Feed