cron(8) improvement

Adrian Chadd adrian at freebsd.org
Sun Nov 10 01:05:12 UTC 2013


On 9 November 2013 16:28, Allan Jude <freebsd at allanjude.com> wrote:

> 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

Right. I'd rather it read in everything, but I realise that scales poorly.

The other alternative is to have a config file populated with the
contents of /etc/rc.conf.d/*, so to modify it you'd edit the
individual config file(s), then do a "commit" operation to push it
into the cache.

If the cache file doesn't exist, it simply goes through and reads *

if someone wanted to speed up the rcvar set, they could just replace
it with a read from an sqlite table or an individual config file (as
said above); the rcvar thing is -supposed- to just be attribute=value,
so it can be stored anywhere.

Note to previous poster: i think the existing policy sucks. :-)


-adrian


More information about the freebsd-current mailing list