How do I enable nightly yum?

Paul Howarth paul at city-fan.org
Wed May 18 13:40:59 UTC 2005


Timothy Murphy wrote:
> Markku Kolkka wrote:
> 
> 
>>>What does it actually mean for yum to be "on"?
>>>
>>>I would have thought a daily (or rather nightly) cron job
>>>running "yum -y update" would be what most people would want,
>>
>>That's exactly what you get when the yum pseudo-service is on.
>>It sets a flag that is checked by the yum.cron script
>>in /etc/cron.daily
> 
> 
> OK, thanks.
> I saw the flag in the yum.cron script,
> but didn't realise its purpose.
> 
> Isn't this a slightly odd way to do things?
> I always assumed that chkconfig is just for starting daemons.

No, chkconfig is for setting/displaying which daemons run automatically 
in each runlevel. It doesn't actually start or stop anything itself 
(well, actually it does for xinetd-based services...). The "service" 
utility can be used to start or stop a daemon at any time (it's just a 
shorthand way of running the daemon's initscript from /etc/rc.d/init.d).

The way the yum service works is that there is a cron job to call yum 
every night. It does this whether nightly yum updates are enabled or 
not. The first thing the cron job does is to check whether nightly 
updates are enabled, and it exits immediately if they're not. This 
method means that yum does not have to run as a daemon itself, saving 
both the effort of implementing this feature in yum and a bit of memory 
on each system it would be running on - as it stands, yum only consumes 
resources when you're actually running it.

Paul.




More information about the fedora-list mailing list