From owner-freebsd-rc@FreeBSD.ORG Wed Sep 2 15:36:50 2009 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 738CA106566B; Wed, 2 Sep 2009 15:36:50 +0000 (UTC) (envelope-from ady@ady.ro) Received: from mail-ew0-f208.google.com (mail-ew0-f208.google.com [209.85.219.208]) by mx1.freebsd.org (Postfix) with ESMTP id CE93C8FC13; Wed, 2 Sep 2009 15:36:49 +0000 (UTC) Received: by ewy4 with SMTP id 4so932618ewy.36 for ; Wed, 02 Sep 2009 08:36:49 -0700 (PDT) MIME-Version: 1.0 Sender: ady@ady.ro Received: by 10.211.154.7 with SMTP id g7mr9051624ebo.10.1251905808533; Wed, 02 Sep 2009 08:36:48 -0700 (PDT) In-Reply-To: <4A9E82FB.5030202@FreeBSD.org> References: <4A9E82FB.5030202@FreeBSD.org> Date: Wed, 2 Sep 2009 17:36:48 +0200 X-Google-Sender-Auth: 5c33645bcdf27d9d Message-ID: <78cb3d3f0909020836u4ebabe67k67632b4e423ff44e@mail.gmail.com> From: Adrian Penisoara To: Doug Barton Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-rc@freebsd.org, villa.alberto@gmail.com Subject: Re: conf/138460: [patch] start local rc scripts in background X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 15:36:50 -0000 Hi, Coming back to this... On Wed, Sep 2, 2009 at 4:36 PM, Doug Barton 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@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