Re: cron(8) improvement

From: Allan Jude <freebsd_at_allanjude.com>
Date: Sat, 09 Nov 2013 19:28:58 -0500
On 2013-11-09 19:18, Adrian Chadd wrote:
> On 9 November 2013 16:05, Daniel O'Connor <doconnor_at_gsoft.com.au> 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.
>>
>> ie either the file is named such that it is ignored by cron (preferable IMO) or the entries in them are commented out.
> I want the opposite.
>
> I'm kinda fed up installing packages that don't enable themselves.
>
> 'pkg install xorg' is not enough to get a working xorg. You have to
> enable hal and dbus and then restart (so things come up in the right
> order; manually starting them doesn't work) in order to get X working.
>
> If people are really worried about this, then I suggest a couple of
> package options for this stuff:
>
> * whether to default enable the package or not;
> * whether to default enable the cron scripts or not.
>
> Please install the cron scripts by default. Please then write up a
> simple rc.conf style setup where the cron scripts can check a config
> file to see if they should run. I don't want to have to freaking
> delete, rename, etc cron.d files. I just want the package files to be
> almost-untouched and have an option of working out of the box.
>
> Please, please allow an option to make this crap work out of the box already.
>
>
> -adrian
> _______________________________________________
> 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"

Well, what about making these extra directories optional then?

packages install the crontab entries, but crond ignores them unless you add:

cron_flags="--scandir /etc/cron.d --scandir /usr/local/etc/cron.d"

or something to that effect

As for packages enabling things, this seems like a good use of the
/etc/rc.conf.d/ infrastructure, although it has a kind of odd structure,
where the individual files are only included if the name of the service
being started patches. So for example, /etc/rc.conf.d/sshd wouldn't be
read when starting crond


-- 
Allan Jude



Received on Sat Nov 09 2013 - 23:29:00 UTC

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