Bug 743473

Summary: Confusing comments in /etc/cron.hourly/0anacron
Product: Red Hat Enterprise Linux 6 Reporter: Etsuji Nakai <enakai>
Component: cronieAssignee: Marcela Mašláňová <mmaslano>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: low Docs Contact:
Priority: low    
Version: 6.1CC: azelinka, jprokes
Target Milestone: rcKeywords: EasyFix
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
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 22:23:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Improvement of comments. none

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