conf/138460: [patch] start local rc scripts in background

Adrian Penisoara ady at freebsd.ady.ro
Wed Sep 2 15:36:50 UTC 2009


Hi,

  Coming back to this...

On Wed, Sep 2, 2009 at 4:36 PM, Doug Barton <dougb at freebsd.org> wrote:

> I object to this patch on at least 2 grounds. First the lack of BEFORE
> in a script does not mean that it is safe to background it. Some other
> script could easily depend on the service directly via REQUIRE, or
> (unfortunately) there could be indirect dependencies that are not
> properly labeled now because we've never needed to label them.
> Personally I actively discourage the use of BEFORE because I think it
> makes it harder to debug ordering problems although it is occasionally
> necessary.
>

I agree REQUIRE should be used instead of BEFORE. But this still leaves the
tricky lexicographical file name ordering in place...


>
> Second it is actually fairly common for locally installed scripts from
> the ports tree at least to depend on each other, and this is not a bug.
>
> The way to approach this would be to add a flag, probably in rc.conf,
> to indicate that it is safe to background a given service. Then
> rc.subr would have to grow support for this but that shouldn't be too
> hard. If you'd like to follow up in that regard you should send a
> message to freebsd-rc at freebsd.org.
>

How about ditching that flag and just determine from the (keyword)
dependency ordering which services may be ran in parallel. Again, the
presumption of lexicographical file name ordering may hinder this algorithm
-- perhaps enforcing rc.subr keywords instead would solve this.

Regards,
Adrian Penisoara
EnterpriseBSD


More information about the freebsd-rc mailing list