[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Question about cron behavior with missing directories



(Stefan, I've posted this to debian-devel, please make sure you
CC them with any replies; others, please make sure you CC Stefan
(petters@lpr.e-technik.tu-muenchen.de) if/when you reply.)

Stefan Petters recently submitted a cron bug
(http://bugs.debian.org/40843) because cron exits when it can't find
/etc/cron.d. He got into this situation because he uses a software
distribution/synchronization tool ("sup") that doesn't automatically
mirror the contents /etc, but must be configured by hand for that
directory, and he forgot to include /etc/cron.d, so it disappeared from
the destination machine(s). He thinks that cron should log an error and
continue.

Originally I agreed with him, but after looking at the code and thinking
about it a while, I'm not sure I do. My arguments would be thus:

1. If the spool dir (/var/spool/cron/crontabs) is missing, it logs and
error and exits.

2. /etc/cron.d is provided by the cron package (actually, it isn't, but
*that* will be fixed in the next release). We don't require our packages
to survive random deletions of their content.

3. It's going to make for some ugly code (which is probably why Paul
Vixie made choice #1).

(FWIW, I think 1 and 2 are the compelling reasons...)

So I guess I'm looking for some opinions about this matter.

Steve


Reply to: