Red Hat Bugzilla – Bug 743473
Confusing comments in /etc/cron.hourly/0anacron
Last modified: 2013-11-21 17:23:40 EST
Created attachment 526357 [details] Improvement of comments. The comments in /etc/cron.hourly/0anacron are rather confusing. It looks like there remains old comments for codes which has been eliminated. The attached is a patch to change them to more relevant ones. Below is the full contents of the patched one. ----------------- #!/bin/bash # Skip excecution unless the date has changed from the previous run if test -r /var/spool/anacron/cron.daily; then day=`cat /var/spool/anacron/cron.daily` fi if [ `date +%Y%m%d` = "$day" ]; then exit 0; fi # Skip excecution unless AC powered if test -x /usr/bin/on_ac_power; then /usr/bin/on_ac_power &> /dev/null if test $? -eq 1; then exit 0 fi fi /usr/sbin/anacron -s -----------------
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. If you would like it considered as an exception in the current release, please ask your support representative.
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate, in the next release of Red Hat Enterprise Linux.
--------------------------------------------------------------------- | Old package: --------------------------------------------------------------------- [root@ibm-p730-04-lp4 ~]# rpm -q cronie cronie-1.4.4-7.el6.ppc64 Content of /etc/cron.hourly/0anacron: #!/bin/bash #in case file doesn't exist if test -r /var/spool/anacron/cron.daily; then day=`cat /var/spool/anacron/cron.daily` fi if [ `date +%Y%m%d` = "$day" ]; then exit 0; fi # in case anacron is already running, # there will be log (daemon won't be running twice). if test -x /usr/bin/on_ac_power; then /usr/bin/on_ac_power &> /dev/null if test $? -eq 1; then exit 0 fi fi /usr/sbin/anacron -s --------------------------------------------------------------------- | New package --------------------------------------------------------------------- [root@ibm-p730-02-lp2 ~]# rpm -q cronie cronie-1.4.4-12.el6.ppc64 Content of /etc/cron.hourly/0anacron: #!/bin/bash # Skip excecution unless the date has changed from the previous run if test -r /var/spool/anacron/cron.daily; then day=`cat /var/spool/anacron/cron.daily` fi if [ `date +%Y%m%d` = "$day" ]; then exit 0; fi # Skip excecution unless AC powered if test -x /usr/bin/on_ac_power; then /usr/bin/on_ac_power &> /dev/null if test $? -eq 1; then exit 0 fi fi /usr/sbin/anacron -s
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1681.html