[PATCH 2/3] Make yum-{daily, hourly}.cron.sh use independent lockfiles.

Zdenek Pavlas zpavlas at redhat.com
Mon Jan 20 16:29:00 UTC 2014


> at the same time, and then the second one to start would see the service
> lock file of the other and exit. Which seemed like a fine idea, except
> the yum lock will also do the same thing so we need to fix both (or do
> nothing).

Check the *.cron.sh files.. these lock files are static, they are not
created/removed when the *job* starts/finishes.  While I think of it,
maybe it'd be easiest to have just one service, and let users edit
/etc/cron.hourly/0yum-cron.cron:

commit 03893f8453dc51ed1f0a229be9f8ceb3eafa0b62
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date:   Mon Jan 20 17:17:56 2014 +0100

    yum-cron-hourly: Configurable, disabled by default.

diff --git a/yum-cron/yum-hourly.cron.sh b/yum-cron/yum-hourly.cron.sh
index f0b77a9..e21ad2d 100755
--- a/yum-cron/yum-hourly.cron.sh
+++ b/yum-cron/yum-hourly.cron.sh
@@ -7,5 +7,5 @@ if [[ ! -f /var/lock/subsys/yum-cron ]]; then
   exit 0
 fi
 
-# Action!
-exec /usr/sbin/yum-cron /etc/yum/yum-cron-hourly.conf
+# Uncomment to run yum-cron hourly
+# exec /usr/sbin/yum-cron /etc/yum/yum-cron-hourly.conf
diff --git a/yum.spec b/yum.spec
index a3e9bcf..867ba76 100644
--- a/yum.spec
+++ b/yum.spec
@@ -404,7 +404,7 @@ exit 0
 %defattr(-,root,root)
 %doc COPYING
 %{_sysconfdir}/cron.daily/0yum-daily.cron
-%{_sysconfdir}/cron.hourly/0yum-hourly.cron
+%config(noreplace) %{_sysconfdir}/cron.hourly/0yum-hourly.cron
 %config(noreplace) %{_sysconfdir}/yum/yum-cron.conf
 %config(noreplace) %{_sysconfdir}/yum/yum-cron-hourly.conf
 %if %{yum_cron_systemd}



More information about the Yum-devel mailing list