Bug 303031 - bug in /usr/bin/run-parts prevents jobs from running
Summary: bug in /usr/bin/run-parts prevents jobs from running
Keywords:
Status: CLOSED DUPLICATE of bug 296741
Alias: None
Product: Fedora
Classification: Fedora
Component: crontabs
Version: rawhide
Hardware: All
OS: Linux
low
urgent
Target Milestone: ---
Assignee: Marcela Mašláňová
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-24 13:53 UTC by Jonathan Kamens
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-09-24 15:22:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jonathan Kamens 2007-09-24 13:53:54 UTC
This recently added line in /usr/bin/run-parts:

[ "$AUX1" == $AUX2 ] || exit 0

should read "&& exit 0" rather than "|| exit 0".  The incorrect code above is 
basically saying, "Don't run this script if it hasn't been run yet today," when 
what it's trying to say is, "Don't run this script if it *has* been run today."

Also, it's bad form to only quote one side of a test expression.  There's no 
harm in writing "$AUX2" instead of $AUX2, and it's better code hygiene to do so.

Finally, since there's no guaranteeing that /var/spool/anacron/cron.daily will 
exist (anacron isn't a requirement for cron, after all), the line above this 
one for setting AUX1 should have "2>/dev/null" to suppress errors if the file 
does not exist.

Basically, whatever you're trying to accomplish with this code, you haven't 
done a very good job of it in this pass.

I have crontabs-1.10-17.fc8.

Comment 1 Jonathan Kamens 2007-09-24 13:54:56 UTC
Oh, and another thing, worse than most of the other problems listed above... 
run-parts is used for cron.hourly as well as cron.daily, weekly and monthly, 
and the newly added code will prevent the hourly cron jobs from running after 
cron.daily has run.


Comment 2 Will Woods 2007-09-24 15:22:59 UTC

*** This bug has been marked as a duplicate of 296741 ***


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