Re: cron(8) improvement

From: Stefan Esser <se_at_freebsd.org>
Date: Mon, 11 Nov 2013 10:28:00 +0100
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
Received on Mon Nov 11 2013 - 08:28:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:44 UTC