cron(8) improvement

Allan Jude freebsd at allanjude.com
Sun Nov 10 16:57:32 UTC 2013


On 2013-11-10 11:21, Warren Block wrote:
> On Sun, 10 Nov 2013, Daniel O'Connor wrote:
>
>>
>> On 10 Nov 2013, at 24:24, Matthew Seaman <matthew at freebsd.org> wrote:
>>>
>>>   2) Should ports / packages populate these cron.d directories?
>>>
>>>       This is a much more interesting question.  Effectively its asking
>>>       if a port / package should provide some level of automatic
>>>       configuration -- a thing that has previously been a no-no for
>>>       FreeBSD.
>>
>> I think it would be OK if they installed entries in a disabled state.
>
> That would be my preference also.
>
>> ie either the file is named such that it is ignored by cron
>> (preferable IMO) or the entries in them are commented out.
>
> Why not just use an additional entry in rc.conf?
>
> rsnapshot_cron="YES"
>
> (If there is a /usr/local/etc/cron.d/rsnapshot, add it to cron on
> start/restart.)
>

I envisioned crond just scanning the directory for added/removed files,
rather than some 'add it to cron' system, and cron doesn't read/parse
the rc.conf system. maybe it makes most sense to make it scan
/usr/local/etc/cron.d/*.cron
So ports can install rsnapshot.cron.sample that the user must manually
enable (like we do with config files)


> This brings up another problem.  When a port is removed, what is done
> with ports cron entries that have been user modified?  Normally,
> modified files would not be removed, but a cron entry for a removed
> port definitely should not be running any more, even if the admin
> forgot to remove the entry in rc.conf.  But just removing the modified
> file is bad also, because maybe the port was just removed as part of
> an upgrade.
> _______________________________________________
> freebsd-current at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to
> "freebsd-current-unsubscribe at freebsd.org"


-- 
Allan Jude


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20131110/4afe6df0/attachment.sig>


More information about the freebsd-current mailing list