Hi,

sorry for the late reply, the maintainers were both on vacation.

On 06/28/2011 03:47 AM, Chris Fordham wrote:
> Package: cron
> Version: 3.0pl1-116
> Severity: important
> 
> RUN-PARTS(8) advises: "If neither the --lsbsysinit option nor the --regex
> option is given then the names must consist entirely of upper and lower case
> letters, digits, underscores, and hyphens."
> 
> This means that the currently used calls to run-parts in  /etc/crontab for
> /etc/cron.{daily,weekly,monthly} will skip any files found in the directories
> that include a file extension, e.g. .sh, .py etc.

The unequal treatment of /etc/cron.d and /etc/cron{hourly,...} is indeed
either an bad bug or a serious omission in the documentation, subtle as
it may be.

I tend to lean towards the latter, as there is no simple way to pass the
--lsbsysinit or --regex options, when specified, from /etc/default/cron
(for /etc/cron.d) to the run-parts calls in /etc/crontab, it being
static and all. There's a hard way to do it, but I don't believe the
complexity it adds is worth it; it might be best to just make this
discrepancy explicit in cron(8).

> My proposal is to change /etc/crontab to call {daily,weekly,monthly} with
> --regex for all valid filenames, e.g.
> 25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts
> --regex "[^/?*:;{}\\]+" --report /etc/cron.daily
> The regex above is just an example, there is likely a better expression for a
> valid filename.

Unfortunately that's not possible, as we *want* the default run-parts
behaviour, at least currently still.


Christian


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to