cron(8) improvement

Allan Jude freebsd at allanjude.com
Sun Nov 10 00:29:00 UTC 2013


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


-------------- 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/20131109/c86c2a88/attachment.sig>


More information about the freebsd-current mailing list