Bug 303031 - bug in /usr/bin/run-parts prevents jobs from running
bug in /usr/bin/run-parts prevents jobs from running
Status: CLOSED DUPLICATE of bug 296741
Product: Fedora
Classification: Fedora
Component: crontabs (Show other bugs)
rawhide
All Linux
low Severity urgent
: ---
: ---
Assigned To: Marcela Mašláňová
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-24 09:53 EDT by Jonathan Kamens
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-09-24 11:22:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jonathan Kamens 2007-09-24 09:53:54 EDT
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 09:54:56 EDT
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 11:22:59 EDT

*** 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.