HomeFreeBSD

cron(8): Reload database if an existing job in cron.d changed as well

Description

cron(8): Reload database if an existing job in cron.d changed as well

Directory mtime will only change if a file is added or removed, not
modified. For /var/cron/tabs, this is fine because of how crontab(1) manages
it using temp files so all crontab(1) changes will trigger a reload of the
database.

For /etc/cron.d and /usr/local/etc/cron.d, this is not necessarily the case.
Instead of checking their mtime, we should descend into them and check mtime
on all jobs also.

Reported by: des
Reviewed by: bapt
MFC after: 1 week

Details

Provenance
kevansAuthored on
Reviewer
bapt
Parents
rS332428: MFC r332061:
Branches
Unknown
Tags
Unknown