Bug 743473 - Confusing comments in /etc/cron.hourly/0anacron
Confusing comments in /etc/cron.hourly/0anacron
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cronie (Show other bugs)
6.1
Unspecified Linux
low Severity low
: rc
: ---
Assigned To: Marcela Mašláňová
qe-baseos-daemons
: EasyFix
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-04 22:30 EDT by Etsuji Nakai
Modified: 2013-11-21 17:23 EST (History)
2 users (show)

See Also:
Fixed In Version: cronie-1.4.4-9.el6
Doc Type: Bug Fix
Doc Text:
Cause: Configuration file /etc/cron.hourly/0anacron contained comments from old releases, which are not tru anymore. Consequence: User might be confused. Fix: Comments were changed to actual state of the script. Result: User is not confused by comments.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-21 17:23:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Improvement of comments. (653 bytes, patch)
2011-10-04 22:30 EDT, Etsuji Nakai
no flags Details | Diff

  None (edit)
Description Etsuji Nakai 2011-10-04 22:30:40 EDT
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
-----------------
Comment 2 RHEL Product and Program Management 2011-10-04 22:48:51 EDT
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.
Comment 5 RHEL Product and Program Management 2012-09-07 01:09:24 EDT
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.
Comment 9 Jakub Prokes 2013-09-25 06:02:05 EDT
---------------------------------------------------------------------
| 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
Comment 10 errata-xmlrpc 2013-11-21 17:23:40 EST
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

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