Bug 429716 - RFE: days of week and check first
RFE: days of week and check first
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: yum-cron (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Habig, Alec
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-22 12:17 EST by Orion Poplawski
Modified: 2008-03-26 13:16 EDT (History)
1 user (show)

See Also:
Fixed In Version: 0.8.2-1.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-26 13:11:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to add CHECK_FIRST and DAYS_OF_WEEK (1.70 KB, patch)
2008-01-22 12:17 EST, Orion Poplawski
no flags Details | Diff

  None (edit)
Description Orion Poplawski 2008-01-22 12:17:58 EST
Description of problem:

I've been running a custom version of /etc/cron.daily/yum.cron for a while.  I
just noticed that a lot of nice work has gone into making the default script
configurable.  I'm including here two modifications that would allow me to use
the stock script (which would be nice).  It adds the following:

CHECK_FIRST - this runs yum check-update first, and then only runs yum update if
it succeeds and there are updates to apply.  This avoids error output getting
generated on laptops when they don't have internet connectivity.

DAYS_OF_WEEK - allows you to configure which days of the week you want yum to
update.  I don't like running on the weekend.
Comment 1 Orion Poplawski 2008-01-22 12:17:58 EST
Created attachment 292537 [details]
patch to add CHECK_FIRST and DAYS_OF_WEEK
Comment 2 Habig, Alec 2008-01-22 18:10:58 EST
Thanks for the patch!  Am working it into the rpm, will test it myself for a few
days then upload it for you to test on your systems.
Comment 3 Orion Poplawski 2008-01-22 18:23:12 EST
There is one typo:

+  elif [ "$CHECK_FIRST" == "yes"]; then

should be

+  elif [ "$CHECK_FIRST" == "yes" ]; then
Comment 4 Orion Poplawski 2008-01-28 11:34:18 EST
Another problem, the loading of the config file needs to be before the
DAYS_OF_WEEK check. 
Comment 5 Fedora Update System 2008-02-21 10:47:59 EST
yum-cron-0.8-1.fc7 has been submitted as an update for Fedora 7
Comment 6 Fedora Update System 2008-02-21 10:48:52 EST
yum-cron-0.8-1.fc8 has been submitted as an update for Fedora 8
Comment 7 Fedora Update System 2008-02-25 19:21:54 EST
yum-cron-0.8-1.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum-cron'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-1916
Comment 8 Fedora Update System 2008-02-28 16:36:41 EST
yum-cron-0.8-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Fedora Update System 2008-02-28 16:42:25 EST
yum-cron-0.8-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 Orion Poplawski 2008-03-04 13:11:33 EST
Sorry, minor fix needed:

--- yum.cron.daily.dow  2008-02-20 08:59:51.000000000 -0700
+++ yum.cron.daily      2008-03-04 11:05:14.000000000 -0700
@@ -24,7 +24,7 @@
 # Only run on certain days of the week
 dow=`date +%w`
 DAYS_OF_WEEK=${DAYS_OF_WEEK:-0123456}
-if [ ${DAYS_OF_WEEK/$dow/} == ${DAYS_OF_WEEK} ]; then
+if [ "${DAYS_OF_WEEK/$dow/}" == "${DAYS_OF_WEEK}" ]; then
   exit 0
 fi

Problem is DAYS_OF_WEEK only has one day in it.
Comment 11 Habig, Alec 2008-03-05 10:39:28 EST
Oops.  Didn't test throughout the week.  Will patch.
Comment 12 Fedora Update System 2008-03-13 15:21:58 EDT
yum-cron-0.8.2-1.fc7 has been submitted as an update for Fedora 7
Comment 13 Fedora Update System 2008-03-13 15:23:17 EDT
yum-cron-0.8.2-1.fc8 has been submitted as an update for Fedora 8
Comment 14 Fedora Update System 2008-03-16 15:29:05 EDT
yum-cron-0.8.2-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum-cron'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F7/FEDORA-2008-2510
Comment 15 Fedora Update System 2008-03-26 13:11:04 EDT
yum-cron-0.8.2-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 16 Fedora Update System 2008-03-26 13:16:20 EDT
yum-cron-0.8.2-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.