[rancid] Re: [patch] Using diffstat in the output mail

Christian Hammers ch at westend.com
Tue May 23 12:10:23 UTC 2006


On Mon, May 22, 2006 at 09:14:46AM -0700, john heasley wrote:
> Mon, May 22, 2006 at 12:25:24PM +0200, Christian Hammers:
> > Hello
> > 
> > I modified the mail output to include the output of diffstat. This gives
> > me a nice overview of what has changed without having to browse through
> > the long mail:
> > 
> >  switch1.intern           |    4 +++-
> >  routerxx.intern          |    4 +++-
> >  sw04-xxx-yyy.westend.com |    4 +++-
> >  3 files changed, 9 insertions(+), 3 deletions(-)
> > 
> > bye,
> > -christian-
> 
> Can't you do this with procmail?

procmail?! As I completely fail to see how procmail can be used here I
better explain my idea a bit more :-)

Normally when changes to our routers were made, I get one mail
containing the diff output of say 6 different router configs.

To see that a) one specific router was affected at all and b) the
changes on this router were very big or just one line, I would have to
scroll down the long mail and inspect the diff.

With this one-line patch I get a nice diffstat output at the top of the
mail and can quickly see that e.g. somebody modified all edge routers
or all intranet routers and can better decide if I want to read the
details...

bye,

-christian-

> 
> > --- old/bin/control_rancid.in   2006-03-15 10:05:33.000000000 +0100
> > +++ new/bin/control_rancid.in   2006-03-16 09:33:44.964493641 +0100
> > @@ -392,6 +392,8 @@
> >  Subject: $subject
> >  Precedence: bulk
> >  
> > +`diffstat $TMP.diff`
> > +
> >  `cat $TMP.diff`
> >  EMAIL
> >  fi
> > 
> > 
> > -- 
> > Christian Hammers             WESTEND GmbH  |  Internet-Business-Provider
> > Technik                       CISCO Systems Partner - Authorized Reseller
> >                               L?tticher Stra?e 10      Tel 0241/701333-11
> > ch at westend.com                D-52064 Aachen              Fax 0241/911879
> > 
> > _______________________________________________
> > Rancid-discuss mailing list
> > Rancid-discuss at shrubbery.net
> > http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss

-- 
Christian Hammers             WESTEND GmbH  |  Internet-Business-Provider
Technik                       CISCO Systems Partner - Authorized Reseller
                              Lütticher Straße 10      Tel 0241/701333-11
ch at westend.com                D-52064 Aachen              Fax 0241/911879




More information about the Rancid-discuss mailing list