Bug 653132 - run-parts update broke existing crontab files
Summary: run-parts update broke existing crontab files
Keywords:
Status: CLOSED DUPLICATE of bug 652268
Alias: None
Product: Fedora
Classification: Fedora
Component: crontabs
Version: 14
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Marcela Mašláňová
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-14 16:01 UTC by Tom Horsley
Modified: 2010-11-15 06:35 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-11-15 06:35:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tom Horsley 2010-11-14 16:01:23 UTC
Description of problem:

Since ancient days, the run-parts script has been invoked thusly in
many crontabs:

run-parts /etc/cron.daily

But the latest version of run-parts contains this line:

for i in $(LC_ALL=C; echo $1*[^~,]) ; do

and when you echo /etc/cron.daily* you get back just /etc/cron.daily*

This results in no scripts in cron.daily being run, same for all the
other things run-parts is invoked by.


Version-Release number of selected component (if applicable):
crontabs-1.11-1.20101109git.fc14.noarch


How reproducible:
100%

Steps to Reproduce:
1.use existing old crontab
2.update the crontabs rpm
3.
  
Actual results:
no scripts from any of the directories passed to run-parts are run

Expected results:
run the individual scripts

Additional info:

OK, I can fix it by passing the directory name with a trailing slash, but
I never had to do that before. How hard would it be for run-parts to do
something like:

case d in $1
do
*/) dir=$1
*) dir="$1/"
esac

(Or whatever the syntax should be for a case - I can never quite remember :-).

Comment 1 Деян 2010-11-14 16:13:34 UTC
I can reproduce the issue on a recent Fedora 14 installation.

Comment 2 Tom Horsley 2010-11-14 16:52:53 UTC
There is also more breakage in the run-parts script. If I run it on
a sample directory with a couple of scripts in it, I get this:

zooty> run-parts /home/tom/tab 
zooty> run-parts /home/tom/tab/
/usr/bin/run-parts: line 69: [: ==: unary operator expected
/home/tom/tab/1one:

run-parts 
/usr/bin/run-parts: line 69: [: ==: unary operator expected
/home/tom/tab/2two:

works!

The $list and $test references in the script need to be
written "$list" and "$test" or list and test need to be
initialized to 0 up front so the symbols will be defined.

Comment 3 Bojan Smojver 2010-11-14 22:32:34 UTC
Bumping up priority/severity. Really annoying - cron.daily not running any more. Please fix ASAP.

Comment 4 Marcela Mašláňová 2010-11-15 06:35:35 UTC

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


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