Attached are patches to extend the functionality of yum-autoupdate to 
allow pre/post actions to be defined for more custom usage.

Here's a short list describing the enhancement and what it allows:

* Defined through $PRERUN and $POSTRUN variables in sysconfig file.

* Action only taken when variable not empty.

* $PRERUN/$POSTRUN are eval'd to allow access to parent script variables 
(with forethought you can get access to $TEMPFILE and $TEMPMAILFILE in 
case you want to alter/parse their data), or to just run an external 
program.

* $POSTRUN happens before mailing in case it should affect the content 
or whether mail is sent.

* Output of $PRERUN is prepended to yum output in mail, and $POSTRUN 
output is appended to yum output that is mailed.

* Output honors $SENDONLYERRORS by filtering STDOUT when true.

* With DEBUG=true will print status messages to STDOUT about the 
PRERUN/POSTRUN output.

* Behaviour without setting PRERUN/POSTRUN is identical to before.

I tried to match the existing coding style and what appeared to be the 
design goals as closely as possible, but please let me know if anything 
looks incorrect. The hope is that this gets included upstream (you) so 
we don't have to roll our own RPM and exclude the upstream version 
(yours).  Obviously we have the ability to fall back to this if this 
patch is deemed undesirable, but hopefully if there's a problem I can 
address it, as it's a fairly simple enhancement.

-Kevan
-Sonic.net