cron(8) improvement

Stefan Esser se at freebsd.org
Mon Nov 11 09:28:12 UTC 2013


Am 10.11.2013 18:23, schrieb Warren Block:
> On Sun, 10 Nov 2013, Philipp Ost wrote:
>> Warren Block schrieb:
>> [...]
>> Given the above scenario, would it be acceptable to set the entry in
>> rc.conf, $portname_cron=YES, to $portname_cron=NO without touching the
>> modified files and inform the user about having done so?
> 
> I would not want the system modifying rc.conf for me, but don't have a
> better idea at present.  Maybe move customized cronfiles to an "old"
> folder on deinstall, so at least the user could recover them.

I like the idea that entries are  ignored unless they end in ".cron".

This does not only allow to install inactive cron scheduled in a file
ending in ".cron.sample", it also lets you rename modified cron tabs
to e.g. ".cron.off" (a convention often used by me).


If the port is re-installed, it is up the administrator to decide
whether a schedule based on a freshly installed ".cron.sample" or
the old ".cron.off" should be enabled.

This would require the deinstall target / tool to rename any cron
entry of the port / package by appending ".off", but that's a minor
change, IMHO.

This might lead to some clutter in ".../cron.d/", but I do not think
that stale files should be automatically removed (even if they were
older than some threshold).

Regards, STefan


More information about the freebsd-current mailing list