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

Zdenek Pavlas zpavlas at redhat.com
Wed Jan 15 09:34:07 UTC 2014


---
 yum-cron/yum-cron-hourly.service  |  6 +++---
 yum-cron/yum-cron-hourly.sysvinit | 10 +++++-----
 yum-cron/yum-cron.sysvinit        |  4 ++--
 yum-cron/yum-hourly.cron.sh       |  2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/yum-cron/yum-cron-hourly.service b/yum-cron/yum-cron-hourly.service
index 82f3e6b..640b6de 100644
--- a/yum-cron/yum-cron-hourly.service
+++ b/yum-cron/yum-cron-hourly.service
@@ -1,11 +1,11 @@
 [Unit]
-Description=Run automatic yum updates as a cron job
+Description=Run automatic yum updates as a hourly cron job
 
 [Service]
 Type=oneshot
 RemainAfterExit=yes
-ExecStart=/bin/touch /var/lock/subsys/yum-cron
-ExecStop=/bin/rm -f /var/lock/subsys/yum-cron
+ExecStart=/bin/touch /var/lock/subsys/yum-cron-hourly
+ExecStop=/bin/rm -f /var/lock/subsys/yum-cron-hourly
 
 [Install]
 WantedBy=multi-user.target
diff --git a/yum-cron/yum-cron-hourly.sysvinit b/yum-cron/yum-cron-hourly.sysvinit
index ee531c6..40e1e87 100644
--- a/yum-cron/yum-cron-hourly.sysvinit
+++ b/yum-cron/yum-cron-hourly.sysvinit
@@ -5,11 +5,11 @@
 # chkconfig:	- 50 01
 #
 # description:  This controls whether yum-cron runs. If this service is \
-#               off, the yum-cron scripts in /etc/cron.daily exit \
+#               off, the yum-cron scripts in /etc/cron.hourly exit \
 #               immediately; otherwise, they download and/or apply package \
-#               updates as configured in /etc/sysconfig/yum-cron.
-# processname:  yum-cron
-# config: /etc/yum/yum-daily.yum
+#               updates as configured.
+# processname:  yum-cron-hourly
+# config: /etc/yum/yum-cron-hourly.conf
 #
 
 # source function library
@@ -17,7 +17,7 @@
 
 test -f /etc/sysconfig/yum-cron && . /etc/sysconfig/yum-cron
 
-lockfile=/var/lock/subsys/yum-cron
+lockfile=/var/lock/subsys/yum-cron-hourly
 
 # This is generated by /usr/sbin/yum-cron and will exist when that script
 # is running and not otherwise.
diff --git a/yum-cron/yum-cron.sysvinit b/yum-cron/yum-cron.sysvinit
index ee531c6..01d8fa6 100644
--- a/yum-cron/yum-cron.sysvinit
+++ b/yum-cron/yum-cron.sysvinit
@@ -7,9 +7,9 @@
 # description:  This controls whether yum-cron runs. If this service is \
 #               off, the yum-cron scripts in /etc/cron.daily exit \
 #               immediately; otherwise, they download and/or apply package \
-#               updates as configured in /etc/sysconfig/yum-cron.
+#               updates as configured.
 # processname:  yum-cron
-# config: /etc/yum/yum-daily.yum
+# config: /etc/yum/yum-cron.conf
 #
 
 # source function library
diff --git a/yum-cron/yum-hourly.cron.sh b/yum-cron/yum-hourly.cron.sh
index f0b77a9..27aa628 100755
--- a/yum-cron/yum-hourly.cron.sh
+++ b/yum-cron/yum-hourly.cron.sh
@@ -3,7 +3,7 @@
 # Only run if this flag is set. The flag is created by the yum-cron init
 # script when the service is started -- this allows one to use chkconfig and
 # the standard "service stop|start" commands to enable or disable yum-cron.
-if [[ ! -f /var/lock/subsys/yum-cron ]]; then
+if [[ ! -f /var/lock/subsys/yum-cron-hourly ]]; then
   exit 0
 fi
 
-- 
1.7.11.7



More information about the Yum-devel mailing list