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.
Created attachment 292537 [details] patch to add CHECK_FIRST and DAYS_OF_WEEK
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.
There is one typo: + elif [ "$CHECK_FIRST" == "yes"]; then should be + elif [ "$CHECK_FIRST" == "yes" ]; then
Another problem, the loading of the config file needs to be before the DAYS_OF_WEEK check.
yum-cron-0.8-1.fc7 has been submitted as an update for Fedora 7
yum-cron-0.8-1.fc8 has been submitted as an update for Fedora 8
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
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.
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.
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.
Oops. Didn't test throughout the week. Will patch.
yum-cron-0.8.2-1.fc7 has been submitted as an update for Fedora 7
yum-cron-0.8.2-1.fc8 has been submitted as an update for Fedora 8
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
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.
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.