Bug 743473 - Confusing comments in /etc/cron.hourly/0anacron
Summary: Confusing comments in /etc/cron.hourly/0anacron
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cronie
Version: 6.1
Hardware: Unspecified
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Marcela Mašláňová
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Keywords: EasyFix
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-05 02:30 UTC by Etsuji Nakai
Modified: 2013-11-21 22:23 UTC (History)
2 users (show)

(edit)
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.
Clone Of:
(edit)
Last Closed: 2013-11-21 22:23:40 UTC


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1681 normal SHIPPED_LIVE cronie bug fix and enhancement update 2013-11-20 21:52:35 UTC

Description Etsuji Nakai 2011-10-05 02:30:40 UTC
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-05 02:48:51 UTC
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 05:09:24 UTC
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 10:02:05 UTC
---------------------------------------------------------------------
| 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 22:23:40 UTC
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.