[Yum] Yum cron defaults
plazonic at Math.Princeton.EDU
Tue Jan 6 04:51:21 UTC 2004
Garrick Staples wrote:
> The "hooks" are called stdout. Just make the cronjob do whatever you want.
>yum ... | whateveryouwant
>yum update | logger -t yum
Let me think - I should write a wrapper processing yum output and trying
to catch all the lines I want while checking from version to version of
yum that Seth didn't change any output text that I was trying to parse?
Or I should send useless text out to the syslog (yum update|logger -t
yum)? No thanks :).
I attach a sample patch that adds syslog option in addition to output to
a file. Just set syslog_ident=yum in /etc/yum.conf and it should send
exactly the same text from /var/log/yum.conf also to syslog with ident
string=yum (or whatever else you choose). I also made it possible to
invoke Logger with file_name param so that Logger can take care of
opening the output file on its own - it is more self contained in this
way (the open statement before creating logger object seemed out of
place, but that's just me :) ).
I'll create a bugzilla entry if Seth thinks it's worth it - it's only
40ish lines that can be done in many different ways in little time, it
would be 10 lines with less config opts. I could in that case also add a
bit of documentation to yum's man page.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Yum