From owner-freebsd-rc@FreeBSD.ORG Sun Dec 4 07:23:29 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF5B916A420; Sun, 4 Dec 2005 07:23:29 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CC4243D5C; Sun, 4 Dec 2005 07:23:26 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id jB47NM4A076469; Sun, 4 Dec 2005 10:23:22 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id jB47NGXH076466; Sun, 4 Dec 2005 10:23:16 +0300 (MSK) (envelope-from yar) Date: Sun, 4 Dec 2005 10:23:15 +0300 From: Yar Tikhiy To: Brooks Davis Message-ID: <20051204072315.GA75603@comp.chem.msu.su> References: <438C37E1.6010600@FreeBSD.org> <20051201003525.GB21393@odin.ac.hmc.edu> <438E4FCB.8060806@FreeBSD.org> <20051202080604.GA12291@comp.chem.msu.su> <20051202163539.GA22464@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051202163539.GA22464@odin.ac.hmc.edu> User-Agent: Mutt/1.5.9i Cc: freebsd-rc@freebsd.org Subject: Re: Adding /usr/local/etc/rc.d to the base rcorder 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: Sun, 04 Dec 2005 07:23:29 -0000 On Fri, Dec 02, 2005 at 08:35:39AM -0800, Brooks Davis wrote: > > > > > > A few comments: > > > > > > > > - I have this vague feeling that we should replace most dependencies on > > > > mountcritremote with a new pseudo target like FILESYSTEMS or MOUNTS. > > > > This isn't important. :) > > > > > > Right, this can be revisited later if needed. The more I thought about this > > > the more I liked the concept of what JR suggested, although obviously I > > > implemented it in a slightly different manner. I'm hesitant to add more > > > pseudo-targets, as I think using mountcritremote is a good "clear bright > > > line" for this purpose. I also have a fantasy down the road (not sure how to > > > implement it yet) of making the point to split early/late configurable. For > > > example, I can imagine a scenario where someone might want to put the split > > > at mountcritlocal. However, this is a good safe place to start. > > > > With a pseudo-target for filesystems, will we still need the split > > hardcoded in /etc/rc? Using a single run of rcorder should be > > sufficient if all our rc.d scripts specify correct interdependencies > > between each other. Using the pseudo-target would be a natural way > > of doing so while keeping the possibility to move the split up and > > down the boot sequence. > > You have to run rccorder twice because until mountcritremote (or an > equivalent pseudo target) you aren't garenteed to have access to all the > files rcorder needs to parse. Now I see. I obviously missed this point. Thanks for clarifying it. However, are there plans to allow for ports inserting theirselves in the early stage? E.g., a 3rd-party routing daemon can be needed to fully start the network prior to doing mountcritremote. And if the routing daemon were built against older libraries in addition, it would need the compat libraries in /usr/local/lib/compat added to the ldconfig search path in advance. This is the case I myself ran into once. Making the split between the stages movable to mountcritlocal, as you proposed, would be a solution. This can be generalized to an rc.conf variable indicating the name of the rc.d script to put the split after. -- Yar From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 07:35:36 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E72E16A41F for ; Mon, 5 Dec 2005 07:35:36 +0000 (GMT) (envelope-from wilfre@tcom.ru) Received: from tcom.ru (ns.ahtuba.com [213.59.125.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CF4343D4C for ; Mon, 5 Dec 2005 07:35:32 +0000 (GMT) (envelope-from wilfre@tcom.ru) Received: from localhost (localhost [127.0.0.1]) by tcom.ru (Postfix) with ESMTP id 1796E7E3ECE for ; Mon, 5 Dec 2005 10:35:30 +0300 (MSK) Received: from tcom.ru ([213.59.125.30]) by localhost (ahtuba.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 79097-10 for ; Mon, 5 Dec 2005 10:35:28 +0300 (MSK) Received: from [172.16.2.134] (unknown [172.16.2.134]) by tcom.ru (Postfix) with ESMTP id 450937E3C3B for ; Mon, 5 Dec 2005 10:35:28 +0300 (MSK) Message-ID: <4393EDBF.5010609@tcom.ru> Date: Mon, 05 Dec 2005 10:35:27 +0300 From: "Andrey V. Semyonov" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.7) Gecko/20050429 X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: freebsd-rc@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at ahtuba.com Subject: RE: Adding /usr/local/etc/rc.d to the base rcorder 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: Mon, 05 Dec 2005 07:35:36 -0000 I apologise for wrong PR-group that a PR was sended to, but it seems to be very strange that no attantion was made to it at all. And, I continue to suppose that the PR's way to `rcorder` scripts via localpkg is more simple (and works fine as I tested) that offered by Doug Barton. http://www.freebsd.org/cgi/query-pr.cgi?pr=85206 From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 07:49:38 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6415116A420 for ; Mon, 5 Dec 2005 07:49:38 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D7F043D5E for ; Mon, 5 Dec 2005 07:49:35 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id jB57nVCB057794; Mon, 5 Dec 2005 10:49:31 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id jB57nU9f057793; Mon, 5 Dec 2005 10:49:30 +0300 (MSK) (envelope-from yar) Date: Mon, 5 Dec 2005 10:49:30 +0300 From: Yar Tikhiy To: "Andrey V. Semyonov" Message-ID: <20051205074930.GB57278@comp.chem.msu.su> References: <4393EDBF.5010609@tcom.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4393EDBF.5010609@tcom.ru> User-Agent: Mutt/1.5.9i Cc: freebsd-rc@freebsd.org Subject: Re: Adding /usr/local/etc/rc.d to the base rcorder 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: Mon, 05 Dec 2005 07:49:38 -0000 On Mon, Dec 05, 2005 at 10:35:27AM +0300, Andrey V. Semyonov wrote: > I apologise for wrong PR-group that a PR was sended to, but it seems to > be very strange that no attantion was made to it at all. And, I continue > to suppose that the PR's way to `rcorder` scripts via localpkg is more > simple (and works fine as I tested) that offered by Doug Barton. > > http://www.freebsd.org/cgi/query-pr.cgi?pr=85206 I'm afraid that your approach is considerably less general than Doug's. The problem with your approach is that /usr/local/etc/rc.d scripts can be rcorder'ed only relative to each other and no script from /usr/local/etc/rc.d can be inserted into the main /etc/rc.d sequence at an arbitrary position. With Doug's approach, the latter is possible with the obvious limitation of /usr/local mounted already. I think that the problem you reported has been solved in CURRENT and the PR state may be changed at least to "patched." -- Yar From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 08:10:29 2005 Return-Path: X-Original-To: freebsd-rc@FreeBSD.org Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F3F6216A41F; Mon, 5 Dec 2005 08:10:28 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB67E43D5D; Mon, 5 Dec 2005 08:10:25 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id jB58AKCX058766; Mon, 5 Dec 2005 11:10:20 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id jB58AKf1058764; Mon, 5 Dec 2005 11:10:20 +0300 (MSK) (envelope-from yar) Date: Mon, 5 Dec 2005 11:10:20 +0300 From: Yar Tikhiy To: Doug Barton Message-ID: <20051205081019.GC57278@comp.chem.msu.su> References: <200512022006.jB2K67AK078509@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200512022006.jB2K67AK078509@repoman.freebsd.org> User-Agent: Mutt/1.5.9i Cc: freebsd-rc@FreeBSD.org Subject: Re: cvs commit: src/etc rc rc.shutdown rc.subr src/etc/rc.d localpkg src/sys/sys param.h 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: Mon, 05 Dec 2005 08:10:29 -0000 On Fri, Dec 02, 2005 at 08:06:07PM +0000, Doug Barton wrote: > dougb 2005-12-02 20:06:07 UTC > > FreeBSD src repository > > Modified files: > etc rc rc.shutdown rc.subr > etc/rc.d localpkg > sys/sys param.h > Log: > Introduce startup scripts from the local_startup directories to > the base rcorder. This is accomplished by running rcorder twice, > first to get all the disks mounted (through mountcritremote), > then again to include the local_startup directories. > > This dramatically changes the behavior of rc.d/localpkg, as > all "local" scripts that have the new rc.d semantics are now > run in the base rcorder, so only scripts that have not been > converted yet will run in rc.d/localpkg. > > Make a similar change in rc.shutdown, and add some functions in > rc.subr to support these changes. > > Bump __FreeBSD_version to reflect this change. > > Revision Changes Path > 1.337 +33 -1 src/etc/rc > 1.7 +5 -32 src/etc/rc.d/localpkg > 1.31 +7 -1 src/etc/rc.shutdown > 1.44 +38 -0 src/etc/rc.subr > 1.254 +1 -1 src/sys/sys/param.h I've just booted a fresh CURRENT with no local rc.d scripts installed and got this message (shown in context): Mounting NFS file systems:. ==> grep: /usr/local/etc/rc.d/*: No such file or directory Checking for core dump on /dev/ad0s1b... Having no local rc.d scripts seems like a case to deal with particularly. Thanks! -- Yar From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 08:20:21 2005 Return-Path: X-Original-To: freebsd-rc@FreeBSD.org Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 832D316A41F for ; Mon, 5 Dec 2005 08:20:21 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mail2.fluidhosting.com [204.14.90.12]) by mx1.FreeBSD.org (Postfix) with SMTP id 55A2B43D5C for ; Mon, 5 Dec 2005 08:20:20 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 58006 invoked by uid 399); 5 Dec 2005 08:20:16 -0000 Received: from localhost (HELO ?192.168.0.5?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 5 Dec 2005 08:20:16 -0000 Message-ID: <4393F83F.7080702@FreeBSD.org> Date: Mon, 05 Dec 2005 00:20:15 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20051203) MIME-Version: 1.0 To: Yar Tikhiy References: <200512022006.jB2K67AK078509@repoman.freebsd.org> <20051205081019.GC57278@comp.chem.msu.su> In-Reply-To: <20051205081019.GC57278@comp.chem.msu.su> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-rc@FreeBSD.org Subject: Re: cvs commit: src/etc rc rc.shutdown rc.subr src/etc/rc.d localpkg src/sys/sys param.h 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: Mon, 05 Dec 2005 08:20:21 -0000 Yar Tikhiy wrote: > I've just booted a fresh CURRENT with no local rc.d scripts installed > and got this message (shown in context): > > Mounting NFS file systems:. > ==> grep: /usr/local/etc/rc.d/*: No such file or directory > Checking for core dump on /dev/ad0s1b... > > Having no local rc.d scripts seems like a case to deal with > particularly. Thanks! Good point, thanks. -- This .signature sanitized for your protection From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 08:22:36 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4A1216A41F for ; Mon, 5 Dec 2005 08:22:36 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mail2.fluidhosting.com [204.14.90.12]) by mx1.FreeBSD.org (Postfix) with SMTP id 4292343D55 for ; Mon, 5 Dec 2005 08:22:36 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 62035 invoked by uid 399); 5 Dec 2005 08:22:35 -0000 Received: from localhost (HELO ?192.168.0.5?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 5 Dec 2005 08:22:35 -0000 Message-ID: <4393F8CA.4010904@FreeBSD.org> Date: Mon, 05 Dec 2005 00:22:34 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20051203) MIME-Version: 1.0 To: "Andrey V. Semyonov" References: <4393EDBF.5010609@tcom.ru> In-Reply-To: <4393EDBF.5010609@tcom.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-rc@freebsd.org Subject: Re: Adding /usr/local/etc/rc.d to the base rcorder 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: Mon, 05 Dec 2005 08:22:36 -0000 Andrey V. Semyonov wrote: > I apologise for wrong PR-group that a PR was sended to, but it seems to > be very strange that no attantion was made to it at all. And, I continue > to suppose that the PR's way to `rcorder` scripts via localpkg is more > simple (and works fine as I tested) that offered by Doug Barton. Thanks for bringing this PR to my attention, I just closed it in order to help keep the PR database neat and clean. :) Seriously though, the clamor for a more general approach (that allows local scripts to be included in the overall rcorder) has been loud and long, and there is no reason we can't overcome the barriers to make it happen. Doug -- This .signature sanitized for your protection From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 09:03:24 2005 Return-Path: X-Original-To: freebsd-rc@hub.freebsd.org Delivered-To: freebsd-rc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 940EE16A420; Mon, 5 Dec 2005 09:03:24 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 49F3343D45; Mon, 5 Dec 2005 09:03:24 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from freefall.freebsd.org (dougb@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id jB593OUM003457; Mon, 5 Dec 2005 09:03:24 GMT (envelope-from dougb@freefall.freebsd.org) Received: (from dougb@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id jB593O9l003452; Mon, 5 Dec 2005 09:03:24 GMT (envelope-from dougb) Date: Mon, 5 Dec 2005 09:03:24 GMT From: Doug Barton Message-Id: <200512050903.jB593O9l003452@freefall.freebsd.org> To: daved@tamu.edu, dougb@FreeBSD.org, freebsd-rc@FreeBSD.org, dougb@FreeBSD.org Cc: Subject: Re: conf/68745: /etc/rc.d/devfs runs after ntpd so links for reference clocks device fails. 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: Mon, 05 Dec 2005 09:03:24 -0000 Synopsis: /etc/rc.d/devfs runs after ntpd so links for reference clocks device fails. State-Changed-From-To: open->closed State-Changed-By: dougb State-Changed-When: Mon Dec 5 09:01:57 GMT 2005 State-Changed-Why: This is very similar to conf/82526. Please see the suggested solution there. Responsible-Changed-From-To: freebsd-rc->dougb Responsible-Changed-By: dougb Responsible-Changed-When: Mon Dec 5 09:01:57 GMT 2005 Responsible-Changed-Why: I'm managing a lot of the rc.d bits. http://www.freebsd.org/cgi/query-pr.cgi?pr=68745 From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 09:10:56 2005 Return-Path: X-Original-To: freebsd-rc@FreeBSD.org Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CBB816A41F for ; Mon, 5 Dec 2005 09:10:56 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mail2.fluidhosting.com [204.14.90.12]) by mx1.FreeBSD.org (Postfix) with SMTP id CA58D43D7C for ; Mon, 5 Dec 2005 09:10:46 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 12308 invoked by uid 399); 5 Dec 2005 09:10:41 -0000 Received: from localhost (HELO ?192.168.0.5?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 5 Dec 2005 09:10:41 -0000 Message-ID: <43940410.7070202@FreeBSD.org> Date: Mon, 05 Dec 2005 01:10:40 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20051203) MIME-Version: 1.0 To: freebsd-rc@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Should savecore run before swap? 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: Mon, 05 Dec 2005 09:10:56 -0000 Please see http://www.freebsd.org/cgi/query-pr.cgi?pr=conf/73834, which looks reasonable to me. Opinions? Doug -- This .signature sanitized for your protection From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 09:16:46 2005 Return-Path: X-Original-To: freebsd-rc@hub.freebsd.org Delivered-To: freebsd-rc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 055C016A41F; Mon, 5 Dec 2005 09:16:46 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 875D743D53; Mon, 5 Dec 2005 09:16:45 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from freefall.freebsd.org (dougb@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id jB59GjQT009167; Mon, 5 Dec 2005 09:16:45 GMT (envelope-from dougb@freefall.freebsd.org) Received: (from dougb@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id jB59Gjuc009163; Mon, 5 Dec 2005 09:16:45 GMT (envelope-from dougb) Date: Mon, 5 Dec 2005 09:16:45 GMT From: Doug Barton Message-Id: <200512050916.jB59Gjuc009163@freefall.freebsd.org> To: dougb@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-rc@FreeBSD.org Cc: Subject: Re: conf/73834: Bad dependencies for /etc/rc.d/savecore 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: Mon, 05 Dec 2005 09:16:46 -0000 Synopsis: Bad dependencies for /etc/rc.d/savecore Responsible-Changed-From-To: freebsd-bugs->freebsd-rc Responsible-Changed-By: dougb Responsible-Changed-When: Mon Dec 5 09:16:28 GMT 2005 Responsible-Changed-Why: Bring this to the attention of the list http://www.freebsd.org/cgi/query-pr.cgi?pr=73834 From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 09:17:36 2005 Return-Path: X-Original-To: freebsd-rc@hub.freebsd.org Delivered-To: freebsd-rc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7FCD516A41F; Mon, 5 Dec 2005 09:17:36 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA79043D5C; Mon, 5 Dec 2005 09:17:35 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from freefall.freebsd.org (dougb@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id jB59HZhJ009214; Mon, 5 Dec 2005 09:17:35 GMT (envelope-from dougb@freefall.freebsd.org) Received: (from dougb@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id jB59HZ25009210; Mon, 5 Dec 2005 09:17:35 GMT (envelope-from dougb) Date: Mon, 5 Dec 2005 09:17:35 GMT From: Doug Barton Message-Id: <200512050917.jB59HZ25009210@freefall.freebsd.org> To: dougb@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-rc@FreeBSD.org Cc: Subject: Re: conf/73909: [patch] rc.d/sshd does not work with ports-ssh 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: Mon, 05 Dec 2005 09:17:36 -0000 Synopsis: [patch] rc.d/sshd does not work with ports-ssh Responsible-Changed-From-To: freebsd-bugs->freebsd-rc Responsible-Changed-By: dougb Responsible-Changed-When: Mon Dec 5 09:17:23 GMT 2005 Responsible-Changed-Why: Bring this to the attention of the list http://www.freebsd.org/cgi/query-pr.cgi?pr=73909 From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 09:20:54 2005 Return-Path: X-Original-To: freebsd-rc@hub.freebsd.org Delivered-To: freebsd-rc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E337716A444; Mon, 5 Dec 2005 09:20:54 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 282D743DB9; Mon, 5 Dec 2005 09:20:06 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from freefall.freebsd.org (dougb@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id jB59JqZ6009330; Mon, 5 Dec 2005 09:19:52 GMT (envelope-from dougb@freefall.freebsd.org) Received: (from dougb@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id jB59JpLl009326; Mon, 5 Dec 2005 09:19:51 GMT (envelope-from dougb) Date: Mon, 5 Dec 2005 09:19:51 GMT From: Doug Barton Message-Id: <200512050919.jB59JpLl009326@freefall.freebsd.org> To: dougb@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-rc@FreeBSD.org Cc: Subject: Re: conf/77663: Suggestion: add /etc/rc.d/addnetswap after addcritremote 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: Mon, 05 Dec 2005 09:20:55 -0000 Synopsis: Suggestion: add /etc/rc.d/addnetswap after addcritremote Responsible-Changed-From-To: freebsd-bugs->freebsd-rc Responsible-Changed-By: dougb Responsible-Changed-When: Mon Dec 5 09:19:37 GMT 2005 Responsible-Changed-Why: Bring this to the attention of the list http://www.freebsd.org/cgi/query-pr.cgi?pr=77663 From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 09:22:20 2005 Return-Path: X-Original-To: freebsd-rc@FreeBSD.org Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B20D316A420; Mon, 5 Dec 2005 09:22:20 +0000 (GMT) (envelope-from emaste@phaedrus.sandvine.ca) Received: from mailserver.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id C125C43D69; Mon, 5 Dec 2005 09:22:07 +0000 (GMT) (envelope-from emaste@phaedrus.sandvine.ca) Received: from labgw2.phaedrus.sandvine.com ([192.168.3.11]) by mailserver.sandvine.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 5 Dec 2005 04:21:11 -0500 Received: by labgw2.phaedrus.sandvine.com (Postfix, from userid 12627) id 304DF1360F; Mon, 5 Dec 2005 04:22:01 -0500 (EST) Date: Mon, 5 Dec 2005 04:22:01 -0500 From: Ed Maste To: Doug Barton Message-ID: <20051205092200.GA6804@sandvine.com> References: <43940410.7070202@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43940410.7070202@FreeBSD.org> User-Agent: Mutt/1.4.2.1i X-OriginalArrivalTime: 05 Dec 2005 09:21:11.0343 (UTC) FILETIME=[3B7133F0:01C5F97D] Cc: freebsd-rc@FreeBSD.org Subject: Re: Should savecore run before swap? 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: Mon, 05 Dec 2005 09:22:20 -0000 On Mon, Dec 05, 2005 at 01:10:40AM -0800, Doug Barton wrote: > Please see http://www.freebsd.org/cgi/query-pr.cgi?pr=conf/73834, which > looks reasonable to me. Opinions? I believe one reason swap is done so early is that fsck might need swap space, and savecore clearly needs a clean filesystem. -ed From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 09:26:19 2005 Return-Path: X-Original-To: freebsd-rc@hub.freebsd.org Delivered-To: freebsd-rc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0383516A420; Mon, 5 Dec 2005 09:26:19 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B427743D46; Mon, 5 Dec 2005 09:26:18 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from freefall.freebsd.org (dougb@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id jB59QIV1009749; Mon, 5 Dec 2005 09:26:18 GMT (envelope-from dougb@freefall.freebsd.org) Received: (from dougb@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id jB59QIqQ009745; Mon, 5 Dec 2005 09:26:18 GMT (envelope-from dougb) Date: Mon, 5 Dec 2005 09:26:18 GMT From: Doug Barton Message-Id: <200512050926.jB59QIqQ009745@freefall.freebsd.org> To: dougb@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-rc@FreeBSD.org Cc: Subject: Re: conf/85363: syntax error in /etc/rc.d/devfs 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: Mon, 05 Dec 2005 09:26:19 -0000 Synopsis: syntax error in /etc/rc.d/devfs Responsible-Changed-From-To: freebsd-bugs->freebsd-rc Responsible-Changed-By: dougb Responsible-Changed-When: Mon Dec 5 09:26:06 GMT 2005 Responsible-Changed-Why: Bring this to the attention of the list http://www.freebsd.org/cgi/query-pr.cgi?pr=85363 From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 09:28:15 2005 Return-Path: X-Original-To: freebsd-rc@hub.freebsd.org Delivered-To: freebsd-rc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A1DE616A41F; Mon, 5 Dec 2005 09:28:15 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39B8E43D46; Mon, 5 Dec 2005 09:28:13 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from freefall.freebsd.org (dougb@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id jB59SDVO010030; Mon, 5 Dec 2005 09:28:13 GMT (envelope-from dougb@freefall.freebsd.org) Received: (from dougb@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id jB59SDIS010026; Mon, 5 Dec 2005 09:28:13 GMT (envelope-from dougb) Date: Mon, 5 Dec 2005 09:28:13 GMT From: Doug Barton Message-Id: <200512050928.jB59SDIS010026@freefall.freebsd.org> To: dougb@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-rc@FreeBSD.org Cc: Subject: Re: conf/88383: [PATCH]: etc/rc.d/ldconfig:does not properly handle ld{-elf}.so.conf 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: Mon, 05 Dec 2005 09:28:15 -0000 Synopsis: [PATCH]: etc/rc.d/ldconfig:does not properly handle ld{-elf}.so.conf Responsible-Changed-From-To: freebsd-bugs->freebsd-rc Responsible-Changed-By: dougb Responsible-Changed-When: Mon Dec 5 09:28:01 GMT 2005 Responsible-Changed-Why: Bring this to the attention of the list http://www.freebsd.org/cgi/query-pr.cgi?pr=88383 From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 09:28:58 2005 Return-Path: X-Original-To: freebsd-rc@hub.freebsd.org Delivered-To: freebsd-rc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B43916A41F; Mon, 5 Dec 2005 09:28:58 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5185543D5E; Mon, 5 Dec 2005 09:28:56 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from freefall.freebsd.org (dougb@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id jB59StQh010081; Mon, 5 Dec 2005 09:28:55 GMT (envelope-from dougb@freefall.freebsd.org) Received: (from dougb@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id jB59StmQ010077; Mon, 5 Dec 2005 09:28:55 GMT (envelope-from dougb) Date: Mon, 5 Dec 2005 09:28:55 GMT From: Doug Barton Message-Id: <200512050928.jB59StmQ010077@freefall.freebsd.org> To: dougb@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-rc@FreeBSD.org Cc: Subject: Re: conf/88974: autoconfigured vlans confuse rc.d/netif 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: Mon, 05 Dec 2005 09:28:58 -0000 Synopsis: autoconfigured vlans confuse rc.d/netif Responsible-Changed-From-To: freebsd-bugs->freebsd-rc Responsible-Changed-By: dougb Responsible-Changed-When: Mon Dec 5 09:28:42 GMT 2005 Responsible-Changed-Why: Bring this to the attention of the list http://www.freebsd.org/cgi/query-pr.cgi?pr=88974 From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 09:48:52 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBDF116A41F; Mon, 5 Dec 2005 09:48:52 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F2F943D60; Mon, 5 Dec 2005 09:48:44 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id jB59maAi063593; Mon, 5 Dec 2005 12:48:37 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id jB59mac6063591; Mon, 5 Dec 2005 12:48:36 +0300 (MSK) (envelope-from yar) Date: Mon, 5 Dec 2005 12:48:36 +0300 From: Yar Tikhiy To: Ed Maste Message-ID: <20051205094836.GA63070@comp.chem.msu.su> References: <43940410.7070202@FreeBSD.org> <20051205092200.GA6804@sandvine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051205092200.GA6804@sandvine.com> User-Agent: Mutt/1.5.9i Cc: freebsd-rc@freebsd.org Subject: Re: Should savecore run before swap? 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: Mon, 05 Dec 2005 09:48:52 -0000 On Mon, Dec 05, 2005 at 04:22:01AM -0500, Ed Maste wrote: > On Mon, Dec 05, 2005 at 01:10:40AM -0800, Doug Barton wrote: > > > Please see http://www.freebsd.org/cgi/query-pr.cgi?pr=conf/73834, which > > looks reasonable to me. Opinions? > > I believe one reason swap is done so early is that fsck might need swap > space, and savecore clearly needs a clean filesystem. Another point to note is that core files are saved to /var/crash by default, which in general might need mountcritremote. BTW, currently mountcrit* isn't on the REQUIRE line of savecore though. -- Yar From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 11:02:20 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E35116A41F for ; Mon, 5 Dec 2005 11:02:20 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B3DA43D68 for ; Mon, 5 Dec 2005 11:02:08 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id jB5B28rH024007 for ; Mon, 5 Dec 2005 11:02:08 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id jB5B27qK024001 for freebsd-rc@freebsd.org; Mon, 5 Dec 2005 11:02:07 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 5 Dec 2005 11:02:07 GMT Message-Id: <200512051102.jB5B27qK024001@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-rc@FreeBSD.org Cc: Subject: Current problem reports assigned to you 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: Mon, 05 Dec 2005 11:02:20 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2005/02/10] conf/77340 rc awk used in /etc/rc.d/nsswitch when not a 1 problem total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2004/06/30] conf/68525 rc Loader's verbose boot mode has rc.d/local o [2004/11/11] conf/73834 rc Bad dependencies for /etc/rc.d/savecore o [2004/11/13] conf/73909 rc [patch] rc.d/sshd does not work with port o [2005/02/18] conf/77663 rc Suggestion: add /etc/rc.d/addnetswap afte o [2005/05/14] kern/81006 rc ipnat not working with tunnel interfaces o [2005/08/27] conf/85363 rc syntax error in /etc/rc.d/devfs o [2005/11/02] conf/88383 rc [PATCH]: etc/rc.d/ldconfig:does not prope o [2005/11/14] conf/88974 rc autoconfigured vlans confuse rc.d/netif 8 problems total. From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 12:58:29 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1CA5216A41F for ; Mon, 5 Dec 2005 12:58:29 +0000 (GMT) (envelope-from itetcu@people.tecnik93.com) Received: from smtp.rdsnet.ro (smtp.rdsnet.ro [62.231.74.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 21B2E43D49 for ; Mon, 5 Dec 2005 12:58:26 +0000 (GMT) (envelope-from itetcu@people.tecnik93.com) Received: (qmail 26719 invoked by uid 89); 5 Dec 2005 12:58:22 -0000 Received: from unknown (HELO it.buh.tecnik93.com) (81.196.204.98) by 0 with SMTP; 5 Dec 2005 12:58:22 -0000 Received: from it.buh.tecnik93.com (localhost [127.0.0.1]) by it.buh.tecnik93.com (Postfix) with ESMTP id C3AABBA5E; Mon, 5 Dec 2005 14:58:05 +0200 (EET) Date: Mon, 5 Dec 2005 14:58:05 +0200 From: Ion-Mihai Tetcu To: ports@FreeBSD.ORG, freebsd-rc@freebsd.org Message-ID: <20051205145805.0db6cf26@it.buh.tecnik93.com> X-Mailer: Sylpheed-Claws 1.9.100 (GTK+ 2.8.8; i386-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Subject: RC keywords question 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: Mon, 05 Dec 2005 12:58:29 -0000 Hi, I'm converting my ports to work with the new HEAD RC style and while at it I also thought to check the keywords to make sure they're OK. Read rcorder(8) and rc(8). Let's take mail/dspam as an example. Obviously it PROVIDE: dspam When run in --daemon mode dspam receives messages via LMTP and deliver them via SMTP. So it REQUIRE: NETWORK; it also uses syslogd (which starts BEFORE: SERVERS). Now things start getting interesting. Since it's a content filter, it should start before the SMTP server. If SMTP server = sendmail|courier it's easy: BEFORE: mail If it's postfix it's: - if it's started via /etc/rc.d/sendmail (sendmail_enable="YES" and postfix in /etc/mail/mailer.conf) BEFORE: mail should be enough (but see below); - if sendmail_enable="NO" and /usr/local/sbin/postfix is linked in rc.d as sendmail.sh then BEFORE: mail should be OK too since that's before rc.d/localpkg (right ?) How to interact with various ways to start qmail I have yet to discover. So until here I would have: PROVIDE: dspam REQUIRE: NETWORK syslogd BEFORE: mail and since mail REQUIRE: LOGIN this is actually: REQUIRE: NETWORK syslogd LOGIN Q: should I write all the REQUIRE keywords or just the last one (LOGIN) ? OK, now dspam could also use mysql or pgsql; if the dependency is set at compile time, it's easy to have the right REQUIRE; but dspam can also use either or none, as instructed in dspam.conf so this is also settable at run-time. How can I write the REQUIRE: line in this case ? Thanks, -- IOnut - Unregistered ;) FreeBSD "user" "Intellectual Property" is nowhere near as valuable as "Intellect" BOFH excuse #344: Network failure - call NBC From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 16:16:57 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D913216A41F; Mon, 5 Dec 2005 16:16:57 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 61D9743D55; Mon, 5 Dec 2005 16:16:57 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id jB5GGuqS011277; Mon, 5 Dec 2005 08:16:56 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id jB5GGuIE011276; Mon, 5 Dec 2005 08:16:56 -0800 Date: Mon, 5 Dec 2005 08:16:56 -0800 From: Brooks Davis To: Ion-Mihai Tetcu Message-ID: <20051205161656.GC7653@odin.ac.hmc.edu> References: <20051205145805.0db6cf26@it.buh.tecnik93.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GZVR6ND4mMseVXL/" Content-Disposition: inline In-Reply-To: <20051205145805.0db6cf26@it.buh.tecnik93.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: ports@freebsd.org, freebsd-rc@freebsd.org Subject: Re: RC keywords question 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: Mon, 05 Dec 2005 16:16:58 -0000 --GZVR6ND4mMseVXL/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 05, 2005 at 02:58:05PM +0200, Ion-Mihai Tetcu wrote: > Hi, >=20 >=20 > I'm converting my ports to work with the new HEAD RC style and while at > it I also thought to check the keywords to make sure they're OK. Read > rcorder(8) and rc(8). >=20 > Let's take mail/dspam as an example. Obviously it PROVIDE: dspam >=20 > When run in --daemon mode dspam receives messages via LMTP and deliver > them via SMTP. So it REQUIRE: NETWORK; it also uses syslogd (which > starts BEFORE: SERVERS). >=20 > Now things start getting interesting. >=20 > Since it's a content filter, it should start before the SMTP server. >=20 > If SMTP server =3D sendmail|courier it's easy: BEFORE: mail >=20 > If it's postfix it's: > - if it's started via /etc/rc.d/sendmail (sendmail_enable=3D"YES" and > postfix in /etc/mail/mailer.conf) BEFORE: mail should be enough (but see > below);=20 > - if sendmail_enable=3D"NO" and /usr/local/sbin/postfix is linked in rc.d > as sendmail.sh then BEFORE: mail should be OK too since that's before > rc.d/localpkg (right ?) >=20 > How to interact with various ways to start qmail I have yet to discover. >=20 > So until here I would have: > PROVIDE: dspam > REQUIRE: NETWORK syslogd > BEFORE: mail > and since mail REQUIRE: LOGIN this is actually: > REQUIRE: NETWORK syslogd LOGIN > > Q: should I write all the REQUIRE keywords or just the last one (LOGIN) ? >=20 >=20 > OK, now dspam could also use mysql or pgsql; if the dependency is set > at compile time, it's easy to have the right REQUIRE; but dspam can > also use either or none, as instructed in dspam.conf so this is also > settable at run-time. How can I write the REQUIRE: line in this case ? "BEFORE: mail" acts for most intents and purposes like all mail scripts contained "REQUIRE: dspam" so dspam does not depend on LOGIN. As a rule, there's no point in depending on syslogd, just depend on SERVERS instead. This is actually what DAEMON is. I'd say that virtually all ports should "REQUIRE: DAEMON" unless they have more specific requirements. For the database support, I'd suggest setting the dependencies based on the ports configure options. It's harmless to depend on something that doesn't actually run, but annoying to depend on something that doesn't exist. The correct solution for databases is probably to add a new dummy script DATABASES which all the database startup scripts should declare they run BEFORE. Then other startup scripts could REQUIRE that unconditionally even if they aren't currently configured to use a database and none are installed. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --GZVR6ND4mMseVXL/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDlGf3XY6L6fI4GtQRAroCAKC0h554in2+JOzvo7M0VNZVw9gupwCfVSYP RTkewPW3xWWBK0DvZUp4hzk= =Nvlt -----END PGP SIGNATURE----- --GZVR6ND4mMseVXL/-- From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 17:09:24 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A0A916A428 for ; Mon, 5 Dec 2005 17:09:24 +0000 (GMT) (envelope-from itetcu@people.tecnik93.com) Received: from smtp.rdsnet.ro (smtp.rdsnet.ro [62.231.74.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC04C43D70 for ; Mon, 5 Dec 2005 17:09:22 +0000 (GMT) (envelope-from itetcu@people.tecnik93.com) Received: (qmail 16590 invoked by uid 89); 5 Dec 2005 17:09:19 -0000 Received: from unknown (HELO it.buh.tecnik93.com) (81.196.204.98) by 0 with SMTP; 5 Dec 2005 17:09:19 -0000 Received: from it.buh.tecnik93.com (localhost [127.0.0.1]) by it.buh.tecnik93.com (Postfix) with ESMTP id 6A39ABA5E; Mon, 5 Dec 2005 19:09:06 +0200 (EET) Date: Mon, 5 Dec 2005 19:09:05 +0200 From: Ion-Mihai Tetcu To: Brooks Davis Message-ID: <20051205190905.28ad8a0a@it.buh.tecnik93.com> In-Reply-To: <20051205161656.GC7653@odin.ac.hmc.edu> References: <20051205145805.0db6cf26@it.buh.tecnik93.com> <20051205161656.GC7653@odin.ac.hmc.edu> X-Mailer: Sylpheed-Claws 1.9.100 (GTK+ 2.8.8; i386-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: ports@freebsd.org, freebsd-rc@freebsd.org Subject: Re: RC keywords question 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: Mon, 05 Dec 2005 17:09:25 -0000 On Mon, 5 Dec 2005 08:16:56 -0800 Brooks Davis wrote: > On Mon, Dec 05, 2005 at 02:58:05PM +0200, Ion-Mihai Tetcu wrote: > > Hi, > > > > > > I'm converting my ports to work with the new HEAD RC style and > > while at it I also thought to check the keywords to make sure > > they're OK. Read rcorder(8) and rc(8). > > > > Let's take mail/dspam as an example. Obviously it PROVIDE: dspam > > > > When run in --daemon mode dspam receives messages via LMTP and > > deliver them via SMTP. So it REQUIRE: NETWORK; it also uses syslogd > > (which starts BEFORE: SERVERS). > > > > Now things start getting interesting. > > > > Since it's a content filter, it should start before the SMTP server. > > > > If SMTP server = sendmail|courier it's easy: BEFORE: mail > > > > If it's postfix it's: > > - if it's started via /etc/rc.d/sendmail (sendmail_enable="YES" and > > postfix in /etc/mail/mailer.conf) BEFORE: mail should be enough > > (but see below); > > - if sendmail_enable="NO" and /usr/local/sbin/postfix is linked in > > rc.d as sendmail.sh then BEFORE: mail should be OK too since that's > > before rc.d/localpkg (right ?) > > > > How to interact with various ways to start qmail I have yet to > > discover. > > > > So until here I would have: > > PROVIDE: dspam > > REQUIRE: NETWORK syslogd > > BEFORE: mail > > and since mail REQUIRE: LOGIN this is actually: > > REQUIRE: NETWORK syslogd LOGIN > > > > Q: should I write all the REQUIRE keywords or just the last one > > (LOGIN) ? > > > > > > OK, now dspam could also use mysql or pgsql; if the dependency is > > set at compile time, it's easy to have the right REQUIRE; but dspam > > can also use either or none, as instructed in dspam.conf so this is > > also settable at run-time. How can I write the REQUIRE: line in > > this case ? > > > "BEFORE: mail" acts for most intents and purposes like all mail > scripts contained "REQUIRE: dspam" so dspam does not depend on > LOGIN. As a rule, there's no point in depending on syslogd, just I think it's better if I make sure dspam starts before its potential consumers that the other way around; and this for one reason: I know that my port's consumers are mail servers, but making each mail server OPTIONally depend of each content filter is obviously unfeasible (of course I counld ask the user to modify his server's rc script by hand). Please correct me if I'm wrong. > depend on SERVERS instead. This is actually what DAEMON is. I'd say > that virtually all ports should "REQUIRE: DAEMON" unless they have > more specific requirements. So I should have REQUIRE: DAEMON and that's all ? Do I understand this right: BEFORE is for approximately selecting when the server should start while REQUIRE actually asks for something to be running ? > For the database support, I'd suggest > setting the dependencies based on the ports configure options. It's > harmless to depend on something that doesn't actually run, but > annoying to depend on something that doesn't exist. In my case the user either select one database back-end and that is statically compiled and then I e.g USE_MYSQL and I can write my BEFORE line (that's what I'm doing now for mysql); Or select multiple WITH_DB_NAME OPTIONS and have support for loading any of them at runtime. For this case what I'm asking is: is there any way to hook-in a script that would parse dspam.conf, see what DB is set and REQUIERE the right thing ? > The correct solution for databases is probably to add a new dummy > script DATABASES which all the database startup scripts should declare > they run BEFORE. Then other startup scripts could REQUIRE that > unconditionally even if they aren't currently configured to use a > database and none are installed. And what do I do until then ? Or I just let the script as it is (.sh) on 7.x also ? Thanks, -- IOnut - Unregistered ;) FreeBSD "user" "Intellectual Property" is nowhere near as valuable as "Intellect" BOFH excuse #406: Bad cafeteria food landed all the sysadmins in the hospital From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 17:14:29 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 964CC16A424; Mon, 5 Dec 2005 17:14:29 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 434C243D91; Mon, 5 Dec 2005 17:14:21 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id jB5HEHO2089241; Mon, 5 Dec 2005 20:14:17 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id jB5HEHim089240; Mon, 5 Dec 2005 20:14:17 +0300 (MSK) (envelope-from yar) Date: Mon, 5 Dec 2005 20:14:16 +0300 From: Yar Tikhiy To: Ion-Mihai Tetcu Message-ID: <20051205171416.GA88485@comp.chem.msu.su> References: <20051205145805.0db6cf26@it.buh.tecnik93.com> <20051205161656.GC7653@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051205161656.GC7653@odin.ac.hmc.edu> User-Agent: Mutt/1.5.9i Cc: ports@freebsd.org, freebsd-rc@freebsd.org Subject: Re: RC keywords question 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: Mon, 05 Dec 2005 17:14:30 -0000 On Mon, Dec 05, 2005 at 08:16:56AM -0800, Brooks Davis wrote: > On Mon, Dec 05, 2005 at 02:58:05PM +0200, Ion-Mihai Tetcu wrote: > > > > I'm converting my ports to work with the new HEAD RC style and while at > > it I also thought to check the keywords to make sure they're OK. Read > > rcorder(8) and rc(8). > > > > Let's take mail/dspam as an example. Obviously it PROVIDE: dspam > > > > When run in --daemon mode dspam receives messages via LMTP and deliver > > them via SMTP. So it REQUIRE: NETWORK; it also uses syslogd (which > > starts BEFORE: SERVERS). > > > > Now things start getting interesting. > > > > Since it's a content filter, it should start before the SMTP server. > > > > If SMTP server = sendmail|courier it's easy: BEFORE: mail > > > > If it's postfix it's: > > - if it's started via /etc/rc.d/sendmail (sendmail_enable="YES" and > > postfix in /etc/mail/mailer.conf) BEFORE: mail should be enough (but see > > below); > > - if sendmail_enable="NO" and /usr/local/sbin/postfix is linked in rc.d > > as sendmail.sh then BEFORE: mail should be OK too since that's before > > rc.d/localpkg (right ?) > > > > How to interact with various ways to start qmail I have yet to discover. > > > > So until here I would have: > > PROVIDE: dspam > > REQUIRE: NETWORK syslogd > > BEFORE: mail > > and since mail REQUIRE: LOGIN this is actually: > > REQUIRE: NETWORK syslogd LOGIN > > > > Q: should I write all the REQUIRE keywords or just the last one (LOGIN) ? Ideally, one should put only REQUIRE keywords for those conditions that are *actually required* by the service, and rcorder will take care of the rest. > > OK, now dspam could also use mysql or pgsql; if the dependency is set > > at compile time, it's easy to have the right REQUIRE; but dspam can > > also use either or none, as instructed in dspam.conf so this is also > > settable at run-time. How can I write the REQUIRE: line in this case ? > > "BEFORE: mail" acts for most intents and purposes like all mail scripts > contained "REQUIRE: dspam" so dspam does not depend on LOGIN. As > a rule, there's no point in depending on syslogd, just depend on > SERVERS instead. This is actually what DAEMON is. I'd say that > virtually all ports should "REQUIRE: DAEMON" unless they have more > specific requirements. For the database support, I'd suggest setting the > dependencies based on the ports configure options. It's harmless to > depend on something that doesn't actually run, but annoying to depend on > something that doesn't exist. > > The correct solution for databases is probably to add a new dummy > script DATABASES which all the database startup scripts should declare > they run BEFORE. Then other startup scripts could REQUIRE that > unconditionally even if they aren't currently configured to use a > database and none are installed. Just an additional remark: In a system with complex interactions it can be hard to order rc.d scripts properly without help from services they start. For instance, the database can REQURE "mail". Then either the mail daemon should spool mail until dspam starts after the database, or dspam should start early and return a temporary failure condition to the mail daemon until it can connect to the database. Similar considerations apply to other practical cases. -- Yar From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 17:27:07 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D8B6316A41F; Mon, 5 Dec 2005 17:27:07 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A27B43D5E; Mon, 5 Dec 2005 17:27:03 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id jB5HQxM4089774; Mon, 5 Dec 2005 20:26:59 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id jB5HQwIx089769; Mon, 5 Dec 2005 20:26:58 +0300 (MSK) (envelope-from yar) Date: Mon, 5 Dec 2005 20:26:58 +0300 From: Yar Tikhiy To: Ion-Mihai Tetcu Message-ID: <20051205172658.GB88485@comp.chem.msu.su> References: <20051205145805.0db6cf26@it.buh.tecnik93.com> <20051205161656.GC7653@odin.ac.hmc.edu> <20051205190905.28ad8a0a@it.buh.tecnik93.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051205190905.28ad8a0a@it.buh.tecnik93.com> User-Agent: Mutt/1.5.9i Cc: ports@freebsd.org, freebsd-rc@freebsd.org Subject: Re: RC keywords question 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: Mon, 05 Dec 2005 17:27:08 -0000 On Mon, Dec 05, 2005 at 07:09:05PM +0200, Ion-Mihai Tetcu wrote: > On Mon, 5 Dec 2005 08:16:56 -0800 > Brooks Davis wrote: > > > On Mon, Dec 05, 2005 at 02:58:05PM +0200, Ion-Mihai Tetcu wrote: > > > Hi, > > > > > > > > > I'm converting my ports to work with the new HEAD RC style and > > > while at it I also thought to check the keywords to make sure > > > they're OK. Read rcorder(8) and rc(8). > > > > > > Let's take mail/dspam as an example. Obviously it PROVIDE: dspam > > > > > > When run in --daemon mode dspam receives messages via LMTP and > > > deliver them via SMTP. So it REQUIRE: NETWORK; it also uses syslogd > > > (which starts BEFORE: SERVERS). > > > > > > Now things start getting interesting. > > > > > > Since it's a content filter, it should start before the SMTP server. > > > > > > If SMTP server = sendmail|courier it's easy: BEFORE: mail > > > > > > If it's postfix it's: > > > - if it's started via /etc/rc.d/sendmail (sendmail_enable="YES" and > > > postfix in /etc/mail/mailer.conf) BEFORE: mail should be enough > > > (but see below); > > > - if sendmail_enable="NO" and /usr/local/sbin/postfix is linked in > > > rc.d as sendmail.sh then BEFORE: mail should be OK too since that's > > > before rc.d/localpkg (right ?) > > > > > > How to interact with various ways to start qmail I have yet to > > > discover. > > > > > > So until here I would have: > > > PROVIDE: dspam > > > REQUIRE: NETWORK syslogd > > > BEFORE: mail > > > and since mail REQUIRE: LOGIN this is actually: > > > REQUIRE: NETWORK syslogd LOGIN > > > > > > Q: should I write all the REQUIRE keywords or just the last one > > > (LOGIN) ? > > > > > > > > > OK, now dspam could also use mysql or pgsql; if the dependency is > > > set at compile time, it's easy to have the right REQUIRE; but dspam > > > can also use either or none, as instructed in dspam.conf so this is > > > also settable at run-time. How can I write the REQUIRE: line in > > > this case ? > > > > > > "BEFORE: mail" acts for most intents and purposes like all mail > > scripts contained "REQUIRE: dspam" so dspam does not depend on > > LOGIN. As a rule, there's no point in depending on syslogd, just > > I think it's better if I make sure dspam starts before its potential > consumers that the other way around; and this for one reason: I know > that my port's consumers are mail servers, but making each mail server > OPTIONally depend of each content filter is obviously unfeasible (of > course I counld ask the user to modify his server's rc script by hand). > Please correct me if I'm wrong. IMHO this is a very good general point. A mail server can live without a content filter while the latter is meaningless without the former. So the filter's rc.d script should use `BEFORE: mail'. > > depend on SERVERS instead. This is actually what DAEMON is. I'd say > > that virtually all ports should "REQUIRE: DAEMON" unless they have > > more specific requirements. > > So I should have REQUIRE: DAEMON and that's all ? > Do I understand this right: BEFORE is for approximately selecting when > the server should start while REQUIRE actually asks for something to be > running ? Why, BEFORE is just the antipode of REQUIRE. REQUIRE asks for something to run before this script while BEFORE asks for this script to run before something. The purpose for the two opposite ways of telling the same dependence is explained above in your own words: When script A depends on script B, the information about the dependence can belong to either A or B while the other script should know nothing about it. -- Yar From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 17:35:32 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 25A4016A41F; Mon, 5 Dec 2005 17:35:32 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id EDC0543D73; Mon, 5 Dec 2005 17:35:27 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id jB5HZNvg090895; Mon, 5 Dec 2005 20:35:23 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id jB5HZMjs090894; Mon, 5 Dec 2005 20:35:22 +0300 (MSK) (envelope-from yar) Date: Mon, 5 Dec 2005 20:35:22 +0300 From: Yar Tikhiy To: Ion-Mihai Tetcu Message-ID: <20051205173522.GC88485@comp.chem.msu.su> References: <20051205145805.0db6cf26@it.buh.tecnik93.com> <20051205161656.GC7653@odin.ac.hmc.edu> <20051205190905.28ad8a0a@it.buh.tecnik93.com> <20051205172658.GB88485@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051205172658.GB88485@comp.chem.msu.su> User-Agent: Mutt/1.5.9i Cc: ports@freebsd.org, freebsd-rc@freebsd.org Subject: Re: RC keywords question 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: Mon, 05 Dec 2005 17:35:32 -0000 On Mon, Dec 05, 2005 at 08:26:58PM +0300, Yar Tikhiy wrote: > > > > > > "BEFORE: mail" acts for most intents and purposes like all mail > > > scripts contained "REQUIRE: dspam" so dspam does not depend on > > > LOGIN. As a rule, there's no point in depending on syslogd, just > > > > I think it's better if I make sure dspam starts before its potential > > consumers that the other way around; and this for one reason: I know > > that my port's consumers are mail servers, but making each mail server > > OPTIONally depend of each content filter is obviously unfeasible (of > > course I counld ask the user to modify his server's rc script by hand). > > Please correct me if I'm wrong. > > IMHO this is a very good general point. A mail server can live > without a content filter while the latter is meaningless without > the former. So the filter's rc.d script should use `BEFORE: mail'. Just a small clarification: I don't mean that the filter must start before mail. I mean that it is the filter's rc.d script that should contain the information for rcorder if any. OTOH, the mail rc.d script need not care about this issue at all. -- Yar From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 21:54:45 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 334F516A42D; Mon, 5 Dec 2005 21:54:45 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE44643D6E; Mon, 5 Dec 2005 21:54:10 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id jB5Lrt8M030087; Mon, 5 Dec 2005 13:53:55 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id jB5Lrq2W030072; Mon, 5 Dec 2005 13:53:52 -0800 Date: Mon, 5 Dec 2005 13:53:52 -0800 From: Brooks Davis To: Ion-Mihai Tetcu Message-ID: <20051205215352.GA24743@odin.ac.hmc.edu> References: <20051205145805.0db6cf26@it.buh.tecnik93.com> <20051205161656.GC7653@odin.ac.hmc.edu> <20051205190905.28ad8a0a@it.buh.tecnik93.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline In-Reply-To: <20051205190905.28ad8a0a@it.buh.tecnik93.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: ports@freebsd.org, freebsd-rc@freebsd.org Subject: Re: RC keywords question 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: Mon, 05 Dec 2005 21:54:45 -0000 --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 05, 2005 at 07:09:05PM +0200, Ion-Mihai Tetcu wrote: > On Mon, 5 Dec 2005 08:16:56 -0800 > Brooks Davis wrote: >=20 > > On Mon, Dec 05, 2005 at 02:58:05PM +0200, Ion-Mihai Tetcu wrote: > > > Hi, > > >=20 > > >=20 > > > I'm converting my ports to work with the new HEAD RC style and > > > while at it I also thought to check the keywords to make sure > > > they're OK. Read rcorder(8) and rc(8). > > >=20 > > > Let's take mail/dspam as an example. Obviously it PROVIDE: dspam > > >=20 > > > When run in --daemon mode dspam receives messages via LMTP and > > > deliver them via SMTP. So it REQUIRE: NETWORK; it also uses syslogd > > > (which starts BEFORE: SERVERS). > > >=20 > > > Now things start getting interesting. > > >=20 > > > Since it's a content filter, it should start before the SMTP server. > > >=20 > > > If SMTP server =3D sendmail|courier it's easy: BEFORE: mail > > >=20 > > > If it's postfix it's: > > > - if it's started via /etc/rc.d/sendmail (sendmail_enable=3D"YES" and > > > postfix in /etc/mail/mailer.conf) BEFORE: mail should be enough > > > (but see below);=20 > > > - if sendmail_enable=3D"NO" and /usr/local/sbin/postfix is linked in > > > rc.d as sendmail.sh then BEFORE: mail should be OK too since that's > > > before rc.d/localpkg (right ?) > > >=20 > > > How to interact with various ways to start qmail I have yet to > > > discover. > > >=20 > > > So until here I would have: > > > PROVIDE: dspam > > > REQUIRE: NETWORK syslogd > > > BEFORE: mail > > > and since mail REQUIRE: LOGIN this is actually: > > > REQUIRE: NETWORK syslogd LOGIN > > > > > > Q: should I write all the REQUIRE keywords or just the last one > > > (LOGIN) ? > > >=20 > > >=20 > > > OK, now dspam could also use mysql or pgsql; if the dependency is > > > set at compile time, it's easy to have the right REQUIRE; but dspam > > > can also use either or none, as instructed in dspam.conf so this is > > > also settable at run-time. How can I write the REQUIRE: line in > > > this case ? > >=20 > >=20 > > "BEFORE: mail" acts for most intents and purposes like all mail > > scripts contained "REQUIRE: dspam" so dspam does not depend on > > LOGIN. As a rule, there's no point in depending on syslogd, just >=20 > I think it's better if I make sure dspam starts before its potential > consumers that the other way around; and this for one reason: I know > that my port's consumers are mail servers, but making each mail server > OPTIONally depend of each content filter is obviously unfeasible (of > course I counld ask the user to modify his server's rc script by hand). > Please correct me if I'm wrong. Yes, you should be using BEFORE here because you need dspam to run before any PROVIDEr of "mail" and you can't assume all providers will be modified. This is what BEFORE is for. > > depend on SERVERS instead. This is actually what DAEMON is. I'd say > > that virtually all ports should "REQUIRE: DAEMON" unless they have > > more specific requirements. >=20 > So I should have REQUIRE: DAEMON and that's all ? Yes. For virtualy every case, this is what what you want to do. > Do I understand this right: BEFORE is for approximately selecting when > the server should start while REQUIRE actually asks for something to be > running ? If there is only one provider of what ever your service script if providing, "BEFORE: someservice" exactly the same as adding "REQUIRE: yourservice" to all files that provide "someservice". > > For the database support, I'd suggest > > setting the dependencies based on the ports configure options. It's > > harmless to depend on something that doesn't actually run, but > > annoying to depend on something that doesn't exist. >=20 > In my case the user either select one database back-end and that is > statically compiled and then I e.g USE_MYSQL and I can write my BEFORE > line (that's what I'm doing now for mysql);=20 >=20 > Or select multiple WITH_DB_NAME OPTIONS and have support for loading > any of them at runtime. For this case what I'm asking is: is there any > way to hook-in a script that would parse dspam.conf, see what DB is set > and REQUIERE the right thing ? At this point you must add REQUIRE lines for any database that you depend on at compile time. If users choose to find a way to circumvent that, there's nothing you can do. Note that it's OK to depend on a startup script that isn't enabled. rcorder, unlike launchd, doesn't care. > > The correct solution for databases is probably to add a new dummy > > script DATABASES which all the database startup scripts should declare > > they run BEFORE. Then other startup scripts could REQUIRE that > > unconditionally even if they aren't currently configured to use a > > database and none are installed. >=20 > And what do I do until then ? Or I just let the script as it is (.sh) > on 7.x also ? We could MFC such a script to RELENG_6 so I don't see a major support issue here. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --LQksG6bCIzRHxTLp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDlLbwXY6L6fI4GtQRAvIrAJ9sypGtsgcQHinsPu54X2yIlCWivgCdEchL +DAhO2j/b4xfmY8W/A88Sxs= =OZL8 -----END PGP SIGNATURE----- --LQksG6bCIzRHxTLp-- From owner-freebsd-rc@FreeBSD.ORG Mon Dec 5 22:06:10 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5443F16A41F; Mon, 5 Dec 2005 22:06:10 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF31843D46; Mon, 5 Dec 2005 22:06:09 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id jB5M0r3l031140; Mon, 5 Dec 2005 14:00:53 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id jB5M0ruk031139; Mon, 5 Dec 2005 14:00:53 -0800 Date: Mon, 5 Dec 2005 14:00:53 -0800 From: Brooks Davis To: Yar Tikhiy Message-ID: <20051205220053.GB24743@odin.ac.hmc.edu> References: <20051205145805.0db6cf26@it.buh.tecnik93.com> <20051205161656.GC7653@odin.ac.hmc.edu> <20051205171416.GA88485@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BwCQnh7xodEAoBMC" Content-Disposition: inline In-Reply-To: <20051205171416.GA88485@comp.chem.msu.su> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: Ion-Mihai Tetcu , ports@freebsd.org, freebsd-rc@freebsd.org Subject: Re: RC keywords question 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: Mon, 05 Dec 2005 22:06:10 -0000 --BwCQnh7xodEAoBMC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 05, 2005 at 08:14:16PM +0300, Yar Tikhiy wrote: > Just an additional remark: >=20 > In a system with complex interactions it can be hard to order rc.d > scripts properly without help from services they start. For instance, > the database can REQURE "mail". Then either the mail daemon should > spool mail until dspam starts after the database, or dspam should > start early and return a temporary failure condition to the mail > daemon until it can connect to the database. Similar considerations > apply to other practical cases. Loops are definitely something to be watched out for, but this one is a somewhat poor example, IMO. Looking at the "mail" scripts in the base, it's clear that they are intended to provide the local delivery agent. If the particular mail system needs daemons running for local mail submission to work, those daemons must start much earlier (probably BEFORE: SERVERS). -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --BwCQnh7xodEAoBMC Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDlLiUXY6L6fI4GtQRAhLGAKDlyWriu6grXydx813jGj7XNAzYIwCgrUDK o84f+5i6W9PLAmTLRQJ78I0= =DCfl -----END PGP SIGNATURE----- --BwCQnh7xodEAoBMC-- From owner-freebsd-rc@FreeBSD.ORG Tue Dec 6 05:14:00 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EEF2E16A41F; Tue, 6 Dec 2005 05:14:00 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0453243D68; Tue, 6 Dec 2005 05:13:52 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id jB65DkcG031393; Tue, 6 Dec 2005 08:13:46 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id jB65DUsq031387; Tue, 6 Dec 2005 08:13:30 +0300 (MSK) (envelope-from yar) Date: Tue, 6 Dec 2005 08:13:30 +0300 From: Yar Tikhiy To: Brooks Davis Message-ID: <20051206051329.GA30433@comp.chem.msu.su> References: <20051205145805.0db6cf26@it.buh.tecnik93.com> <20051205161656.GC7653@odin.ac.hmc.edu> <20051205171416.GA88485@comp.chem.msu.su> <20051205220053.GB24743@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051205220053.GB24743@odin.ac.hmc.edu> User-Agent: Mutt/1.5.9i Cc: Ion-Mihai Tetcu , ports@freebsd.org, freebsd-rc@freebsd.org Subject: Re: RC keywords question 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: Tue, 06 Dec 2005 05:14:01 -0000 On Mon, Dec 05, 2005 at 02:00:53PM -0800, Brooks Davis wrote: > On Mon, Dec 05, 2005 at 08:14:16PM +0300, Yar Tikhiy wrote: > > Just an additional remark: > > > > In a system with complex interactions it can be hard to order rc.d > > scripts properly without help from services they start. For instance, > > the database can REQURE "mail". Then either the mail daemon should > > spool mail until dspam starts after the database, or dspam should > > start early and return a temporary failure condition to the mail > > daemon until it can connect to the database. Similar considerations > > apply to other practical cases. > > Loops are definitely something to be watched out for, but this one is > a somewhat poor example, IMO. Looking at the "mail" scripts in the > base, it's clear that they are intended to provide the local delivery > agent. If the particular mail system needs daemons running for local > mail submission to work, those daemons must start much earlier (probably > BEFORE: SERVERS). Have you ever met lame software trying to send mail about its condition directly by SMTP to a pre-set local relay? So a database engine can, in theory, requre "mail". Of course, I won't advise using such a bogus DB engine, but my example isn't too poor either ;-) -- Yar From owner-freebsd-rc@FreeBSD.ORG Tue Dec 6 05:51:32 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7EFCE16A41F; Tue, 6 Dec 2005 05:51:32 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id C794643D5E; Tue, 6 Dec 2005 05:51:31 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id jB65jhgV006488; Mon, 5 Dec 2005 21:45:43 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id jB65jhRE006487; Mon, 5 Dec 2005 21:45:43 -0800 Date: Mon, 5 Dec 2005 21:45:43 -0800 From: Brooks Davis To: Yar Tikhiy Message-ID: <20051206054543.GB4661@odin.ac.hmc.edu> References: <20051205145805.0db6cf26@it.buh.tecnik93.com> <20051205161656.GC7653@odin.ac.hmc.edu> <20051205171416.GA88485@comp.chem.msu.su> <20051205220053.GB24743@odin.ac.hmc.edu> <20051206051329.GA30433@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kORqDWCi7qDJ0mEj" Content-Disposition: inline In-Reply-To: <20051206051329.GA30433@comp.chem.msu.su> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: Ion-Mihai Tetcu , ports@freebsd.org, freebsd-rc@freebsd.org Subject: Re: RC keywords question 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: Tue, 06 Dec 2005 05:51:32 -0000 --kORqDWCi7qDJ0mEj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 06, 2005 at 08:13:30AM +0300, Yar Tikhiy wrote: > On Mon, Dec 05, 2005 at 02:00:53PM -0800, Brooks Davis wrote: > > On Mon, Dec 05, 2005 at 08:14:16PM +0300, Yar Tikhiy wrote: > > > Just an additional remark: > > >=20 > > > In a system with complex interactions it can be hard to order rc.d > > > scripts properly without help from services they start. For instance, > > > the database can REQURE "mail". Then either the mail daemon should > > > spool mail until dspam starts after the database, or dspam should > > > start early and return a temporary failure condition to the mail > > > daemon until it can connect to the database. Similar considerations > > > apply to other practical cases. > >=20 > > Loops are definitely something to be watched out for, but this one is > > a somewhat poor example, IMO. Looking at the "mail" scripts in the > > base, it's clear that they are intended to provide the local delivery > > agent. If the particular mail system needs daemons running for local > > mail submission to work, those daemons must start much earlier (probably > > BEFORE: SERVERS). >=20 > Have you ever met lame software trying to send mail about its > condition directly by SMTP to a pre-set local relay? So a database > engine can, in theory, requre "mail". Of course, I won't advise > using such a bogus DB engine, but my example isn't too poor either ;-) A valid point. Of course the code either works correctly when a dependency doen't work, or it's totally hopeless and you will have to ditch the database in question. :) -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --kORqDWCi7qDJ0mEj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDlSWGXY6L6fI4GtQRAt9fAJ9FQgCOonzDhoKsdX9Jk8wA+iXLOACgg6o9 zMUP0SGZ99o0UTS6DbHUGhg= =IOli -----END PGP SIGNATURE----- --kORqDWCi7qDJ0mEj-- From owner-freebsd-rc@FreeBSD.ORG Thu Dec 8 21:54:06 2005 Return-Path: X-Original-To: freebsd-rc@FreeBSD.org Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A74316A41F for ; Thu, 8 Dec 2005 21:54:06 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mail2.fluidhosting.com [204.14.90.12]) by mx1.FreeBSD.org (Postfix) with SMTP id E1A0243D70 for ; Thu, 8 Dec 2005 21:53:59 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 97500 invoked by uid 399); 8 Dec 2005 21:53:55 -0000 Received: from localhost (HELO ?192.168.0.3?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 8 Dec 2005 21:53:55 -0000 Message-ID: <4398AB6A.3000209@FreeBSD.org> Date: Thu, 08 Dec 2005 13:53:46 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20051206) MIME-Version: 1.0 To: freebsd-rc@FreeBSD.org Content-Type: multipart/mixed; boundary="------------020801090309070505050802" Cc: Subject: For Review: Latest update to rcorder patch 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: Thu, 08 Dec 2005 21:54:06 -0000 This is a multi-part message in MIME format. --------------020801090309070505050802 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Howdy, The attached patch contains what I hope are the final tweaks to the new rcorder code. It has the following changes: 1. Silences a grep warning when an rc.d directory in $local_startup is empty. 2. Adds a variable to /etc/defaults/rc.conf called early_late_divider (better name suggestions welcome) that defines the script to use to separate the early and late stages, and the commensurate code in rc. This makes the option configurable, which on the one hand puts a bullet in the foot-shooting gun for careless admins, but on the other hand gives more flexibility to those that can make use of it. 3. Defaults the divider to mountcritlocal, instead of mountcritremote. When last I talked to Brooks about this, he said that this would "probably" be ok even for diskless booting, however I'm willing to make it mountcritremote for now if we're not sure of this. Alternatively, we can make the default mountcritlocal, and instruct diskless booters to change this setting. Since I am not really involved in the diskless booting stuff, I'm totally open to the consensus opinion on this. If we change it, this will move the following scripts into the late stage: /etc/rc.d/var /etc/rc.d/cleanvar /etc/rc.d/random /etc/rc.d/adjkerntz /etc/rc.d/atm1 /etc/rc.d/hostname /etc/rc.d/ipfilter /etc/rc.d/ipnat /etc/rc.d/ipfs /etc/rc.d/kldxref /etc/rc.d/sppp /etc/rc.d/addswap /etc/rc.d/sysctl /etc/rc.d/serial /etc/rc.d/pccard /etc/rc.d/netif /etc/rc.d/isdnd /etc/rc.d/ppp /etc/rc.d/ipfw /etc/rc.d/nsswitch /etc/rc.d/newsyslog /etc/rc.d/syslogd /etc/rc.d/ip6addrctl /etc/rc.d/atm2 /etc/rc.d/pfsync /etc/rc.d/pflog /etc/rc.d/pf /etc/rc.d/routing /etc/rc.d/ip6fw /etc/rc.d/network_ipv6 /etc/rc.d/mroute6d /etc/rc.d/route6d /etc/rc.d/mrouted /etc/rc.d/routed /etc/rc.d/NETWORKING /etc/rc.d/devd /etc/rc.d/ipsec Enjoy, Doug -- This .signature sanitized for your protection --------------020801090309070505050802 Content-Type: text/plain; name="rc.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="rc.diff" Index: rc =================================================================== RCS file: /usr/local/ncvs/src/etc/rc,v retrieving revision 1.337 diff -u -r1.337 rc --- rc 2 Dec 2005 20:06:07 -0000 1.337 +++ rc 8 Dec 2005 21:23:56 -0000 @@ -73,7 +73,7 @@ skip="-s nostart" [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ] && skip="$skip -s nojail" -# Do a first pass to get everything up to mountcritremote so that +# Do a first pass to get everything up to $early_late_divider so that # we can do a second pass that includes $local_startup directories # files=`rcorder ${skip} /etc/rc.d/* 2>/dev/null` @@ -82,7 +82,7 @@ run_rc_script ${_rc_elem} ${_boot} case "$_rc_elem" in - */mountcritremote) break ;; + */${early_late_divider}) break ;; esac done @@ -101,7 +101,7 @@ for _rc_elem in ${files}; do case "$_skip_early" in 1) case "$_rc_elem" in - */mountcritremote) _skip_early=0 ;; + */${early_late_divider}) _skip_early=0 ;; esac continue ;; Index: rc.subr =================================================================== RCS file: /usr/local/ncvs/src/etc/rc.subr,v retrieving revision 1.45 diff -u -r1.45 rc.subr --- rc.subr 5 Dec 2005 07:04:15 -0000 1.45 +++ rc.subr 8 Dec 2005 21:20:15 -0000 @@ -1380,7 +1380,7 @@ local_rc='' for dir in ${local_startup}; do if [ -d "${dir}" ]; then - for file in `grep -l '^# PROVIDE:' ${dir}/*`; do + for file in `grep -l '^# PROVIDE:' ${dir}/* 2>/dev/null`; do case "$file" in *.sample) ;; *) if [ -x "$file" ]; then Index: defaults/rc.conf =================================================================== RCS file: /usr/local/ncvs/src/etc/defaults/rc.conf,v retrieving revision 1.265 diff -u -r1.265 rc.conf --- defaults/rc.conf 24 Nov 2005 14:39:41 -0000 1.265 +++ defaults/rc.conf 8 Dec 2005 21:27:04 -0000 @@ -24,6 +24,10 @@ rc_debug="NO" # Set to YES to enable debugging output from rc.d rc_info="NO" # Enables display of informational messages at boot. rcshutdown_timeout="30" # Seconds to wait before terminating rc.shutdown +early_late_divider="mountcritlocal" # Script that separates early/late + # stages of the boot process. Make sure you know + # the ramifications if you change this. + swapfile="NO" # Set to name of swapfile if aux swapfile desired. apm_enable="NO" # Set to YES to enable APM BIOS functions (or NO). apmd_enable="NO" # Run apmd to handle APM event from userland. --------------020801090309070505050802-- From owner-freebsd-rc@FreeBSD.ORG Thu Dec 8 22:19:20 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B0C6116A41F for ; Thu, 8 Dec 2005 22:19:20 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mail2.fluidhosting.com [204.14.90.12]) by mx1.FreeBSD.org (Postfix) with SMTP id 34F8143D58 for ; Thu, 8 Dec 2005 22:19:16 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 19185 invoked by uid 399); 8 Dec 2005 22:19:10 -0000 Received: from localhost (HELO ?192.168.0.3?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 8 Dec 2005 22:19:10 -0000 Message-ID: <4398B15C.5050501@FreeBSD.org> Date: Thu, 08 Dec 2005 14:19:08 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20051206) MIME-Version: 1.0 To: Ion-Mihai Tetcu References: <20051205145805.0db6cf26@it.buh.tecnik93.com> In-Reply-To: <20051205145805.0db6cf26@it.buh.tecnik93.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ports@FreeBSD.ORG, freebsd-rc@freebsd.org Subject: Re: RC keywords question 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: Thu, 08 Dec 2005 22:19:20 -0000 Hopefully by new your actual question has been adequately answered, however I wanted to reemphasize one point from this thread because it will be very important for port authors to understand as we move into the world of ports being run as part of the base rcorder. The REQUIRE line does not guarantee that a service will be running when your script starts, it only specifies to rcorder what has to happen before this script is run. Therefore, your application must handle any error conditions that may result if the service you depend on is not actually running when your script tries to run. hth, Doug -- This .signature sanitized for your protection From owner-freebsd-rc@FreeBSD.ORG Thu Dec 8 22:20:14 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 85A6D16A41F; Thu, 8 Dec 2005 22:20:14 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A50B43D45; Thu, 8 Dec 2005 22:20:13 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id jB8MKD0S009475; Thu, 8 Dec 2005 14:20:13 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id jB8MKDS4009474; Thu, 8 Dec 2005 14:20:13 -0800 Date: Thu, 8 Dec 2005 14:20:13 -0800 From: Brooks Davis To: Doug Barton Message-ID: <20051208222013.GB5759@odin.ac.hmc.edu> References: <4398AB6A.3000209@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="E39vaYmALEf/7YXx" Content-Disposition: inline In-Reply-To: <4398AB6A.3000209@FreeBSD.org> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: freebsd-rc@freebsd.org Subject: Re: For Review: Latest update to rcorder patch 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: Thu, 08 Dec 2005 22:20:14 -0000 --E39vaYmALEf/7YXx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 08, 2005 at 01:53:46PM -0800, Doug Barton wrote: > Howdy, >=20 > The attached patch contains what I hope are the final tweaks to the new= =20 > rcorder code. It has the following changes: >=20 > 1. Silences a grep warning when an rc.d directory in $local_startup is=20 > empty. >=20 > 2. Adds a variable to /etc/defaults/rc.conf called early_late_divider=20 > (better name suggestions welcome) that defines the script to use to=20 > separate the early and late stages, and the commensurate code in rc. This= =20 > makes the option configurable, which on the one hand puts a bullet in the= =20 > foot-shooting gun for careless admins, but on the other hand gives more= =20 > flexibility to those that can make use of it. >=20 > 3. Defaults the divider to mountcritlocal, instead of mountcritremote.=20 > When last I talked to Brooks about this, he said that this would=20 > "probably" be ok even for diskless booting, however I'm willing to make i= t=20 > mountcritremote for now if we're not sure of this. Alternatively, we can= =20 > make the default mountcritlocal, and instruct diskless booters to change= =20 > this setting. Since I am not really involved in the diskless booting=20 > stuff, I'm totally open to the consensus opinion on this. If we change it= ,=20 > this will move the following scripts into the late stage: Conceptually, I'm happy with this. A few things. - I'd suggest explicitly stating that the only sane values for $early_late_divider are probably root, mountcritlocal, and mountcritremote. - diskless.8 should probably be updated to mentation that early_late_divider must be set to mountcritremote for the documented configuration to work. - If you want to depend on an rc.conf value in /etc/rc, /etc/rc.d/rcconf.sh should die. early_late_divider is only non-zero every time through the loop by accident at this point. Since rcconf.sh is no longer needed due to moving rc.d/initdiskless back to /etc/rc.initdiskless, it's safe to handle configuration in /etc/rc. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --E39vaYmALEf/7YXx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDmLGcXY6L6fI4GtQRAn5XAJ4kQy0OYJwsc0rSC3aT9V3Sk/9Q9wCfXLop /B9ZaL5DRqdrOAGFeAXekTQ= =b0lj -----END PGP SIGNATURE----- --E39vaYmALEf/7YXx-- From owner-freebsd-rc@FreeBSD.ORG Fri Dec 9 10:45:36 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 19F8A16A41F for ; Fri, 9 Dec 2005 10:45:36 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mail2.fluidhosting.com [204.14.90.12]) by mx1.FreeBSD.org (Postfix) with SMTP id E265243D8F for ; Fri, 9 Dec 2005 10:45:25 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 82234 invoked by uid 399); 9 Dec 2005 10:45:24 -0000 Received: from localhost (HELO ?192.168.1.101?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 9 Dec 2005 10:45:24 -0000 Message-ID: <43996043.8020609@FreeBSD.org> Date: Fri, 09 Dec 2005 02:45:23 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20051203) MIME-Version: 1.0 To: Brooks Davis References: <4398AB6A.3000209@FreeBSD.org> <20051208222013.GB5759@odin.ac.hmc.edu> In-Reply-To: <20051208222013.GB5759@odin.ac.hmc.edu> Content-Type: multipart/mixed; boundary="------------040501060006070409010202" Cc: freebsd-rc@freebsd.org Subject: Re: For Review: Latest update to rcorder patch 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: Fri, 09 Dec 2005 10:45:36 -0000 This is a multi-part message in MIME format. --------------040501060006070409010202 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Brooks Davis wrote: > Conceptually, I'm happy with this. A few things. > > - I'd suggest explicitly stating that the only sane values > for $early_late_divider are probably root, mountcritlocal, and > mountcritremote. Yeah, I ended up having to finish my message in a hurry (real life called), and I forgot to add that I hadn't finished the rc.conf man page entry yet. I am always hesitant to add too much info to the rc.conf file, mostly because people who are determined to self foot-shoot will ignore it anyway. :) I've added my proposed patch to rc.conf(5). > - diskless.8 should probably be updated to mentation that > early_late_divider must be set to mountcritremote for the documented > configuration to work. I can do that as part of the change if you want, or you can do it, just let me know. > - If you want to depend on an rc.conf value in /etc/rc, > /etc/rc.d/rcconf.sh should die. early_late_divider is only non-zero > every time through the loop by accident at this point. Ok, good plan. :) Based on our earlier conversation, I've also moved the sourcing of rc.subr to after rc.initdiskless. In the non-diskless case, this should be a total noop, so I'm not worried about this part of the change, and if we're going to do it, we should do it now. Although I didn't include it in this patch, I'll remove rcconf.sh as well. > Since > rcconf.sh is no longer needed due to moving rc.d/initdiskless back > to /etc/rc.initdiskless, it's safe to handle configuration in /etc/rc. Sounds great to me! Thanks as always for your feedback and careful thought here. Doug -- This .signature sanitized for your protection --------------040501060006070409010202 Content-Type: text/plain; name="rc.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="rc.diff" Index: etc/rc =================================================================== RCS file: /usr/local/ncvs/src/etc/rc,v retrieving revision 1.337 diff -u -r1.337 rc --- etc/rc 2 Dec 2005 20:06:07 -0000 1.337 +++ etc/rc 9 Dec 2005 09:55:41 -0000 @@ -50,12 +50,6 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin export HOME PATH -. /etc/rc.subr - -# Note: the system configuration files are loaded as part of -# the rc.d system (rc.d/rcconf.sh). Do not load them here as it may -# interfere with diskless booting. -# if [ "$1" = autoboot ]; then autoboot=yes _boot="faststart" @@ -70,10 +64,18 @@ sh /etc/rc.initdiskless fi +# Run these after determining whether we are booting diskless in order +# to minimize the number of files that are needed on a diskless system, +# and to make the configuration file variables available to rc itself. +# +. /etc/rc.subr +echo "Loading configuration files." +load_rc_config 'XXX' + skip="-s nostart" [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ] && skip="$skip -s nojail" -# Do a first pass to get everything up to mountcritremote so that +# Do a first pass to get everything up to $early_late_divider so that # we can do a second pass that includes $local_startup directories # files=`rcorder ${skip} /etc/rc.d/* 2>/dev/null` @@ -82,7 +84,7 @@ run_rc_script ${_rc_elem} ${_boot} case "$_rc_elem" in - */mountcritremote) break ;; + */${early_late_divider}) break ;; esac done @@ -101,7 +103,7 @@ for _rc_elem in ${files}; do case "$_skip_early" in 1) case "$_rc_elem" in - */mountcritremote) _skip_early=0 ;; + */${early_late_divider}) _skip_early=0 ;; esac continue ;; Index: etc/rc.subr =================================================================== RCS file: /usr/local/ncvs/src/etc/rc.subr,v retrieving revision 1.45 diff -u -r1.45 rc.subr --- etc/rc.subr 5 Dec 2005 07:04:15 -0000 1.45 +++ etc/rc.subr 8 Dec 2005 21:20:15 -0000 @@ -1380,7 +1380,7 @@ local_rc='' for dir in ${local_startup}; do if [ -d "${dir}" ]; then - for file in `grep -l '^# PROVIDE:' ${dir}/*`; do + for file in `grep -l '^# PROVIDE:' ${dir}/* 2>/dev/null`; do case "$file" in *.sample) ;; *) if [ -x "$file" ]; then Index: etc/defaults/rc.conf =================================================================== RCS file: /usr/local/ncvs/src/etc/defaults/rc.conf,v retrieving revision 1.265 diff -u -r1.265 rc.conf --- etc/defaults/rc.conf 24 Nov 2005 14:39:41 -0000 1.265 +++ etc/defaults/rc.conf 9 Dec 2005 10:16:12 -0000 @@ -24,6 +24,11 @@ rc_debug="NO" # Set to YES to enable debugging output from rc.d rc_info="NO" # Enables display of informational messages at boot. rcshutdown_timeout="30" # Seconds to wait before terminating rc.shutdown +early_late_divider="mountcritlocal" # Script that separates early/late + # stages of the boot process. Make sure you know + # the ramifications if you change this. + # See rc.conf(5) for more details. + swapfile="NO" # Set to name of swapfile if aux swapfile desired. apm_enable="NO" # Set to YES to enable APM BIOS functions (or NO). apmd_enable="NO" # Run apmd to handle APM event from userland. Index: share/man/man5/rc.conf.5 =================================================================== RCS file: /usr/local/ncvs/src/share/man/man5/rc.conf.5,v retrieving revision 1.271 diff -u -r1.271 rc.conf.5 --- share/man/man5/rc.conf.5 18 Nov 2005 10:52:23 -0000 1.271 +++ share/man/man5/rc.conf.5 9 Dec 2005 10:18:37 -0000 @@ -90,6 +90,29 @@ Informational messages are displayed when a condition that is not serious enough to warrant a warning or an error occurs. +.It Va early_late_divider +.Pq Vt str +The name of the script that should be used as the +delimiter between the +.Dq early +and +.Dq late +stages of the boot process. +The early stage should contain all the services needed to +get the disks (local or remote) mounted so that the late +stage can include scripts contained in the directories +listed in the +.Va local_startup +variable (see below). +Thus, the two likely candidates for this value are +mountcritlocal for the typical system, +and mountcritremote if the system is +.Dq diskless . +Extreme care should be taken when changing this value, +and before changing it one should ensure that there are +adequate provisions to recover from a failed boot +(such as physical contact with the machine, +or reliable remote console access). .It Va swapfile .Pq Vt str If set to --------------040501060006070409010202-- From owner-freebsd-rc@FreeBSD.ORG Fri Dec 9 19:38:35 2005 Return-Path: X-Original-To: freebsd-rc@FreeBSD.org Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F9F016A41F; Fri, 9 Dec 2005 19:38:35 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 286B443D7D; Fri, 9 Dec 2005 19:38:31 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id jB9JcVld019185; Fri, 9 Dec 2005 11:38:31 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id jB9JcUhA019184; Fri, 9 Dec 2005 11:38:30 -0800 Date: Fri, 9 Dec 2005 11:38:30 -0800 From: Brooks Davis To: Doug Barton Message-ID: <20051209193830.GA15097@odin.ac.hmc.edu> References: <4398AB6A.3000209@FreeBSD.org> <20051208222013.GB5759@odin.ac.hmc.edu> <43996043.8020609@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SLDf9lqlvOQaIe6s" Content-Disposition: inline In-Reply-To: <43996043.8020609@FreeBSD.org> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: freebsd-rc@FreeBSD.org Subject: Re: For Review: Latest update to rcorder patch 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: Fri, 09 Dec 2005 19:38:35 -0000 --SLDf9lqlvOQaIe6s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 09, 2005 at 02:45:23AM -0800, Doug Barton wrote: > Brooks Davis wrote: >=20 > >Conceptually, I'm happy with this. A few things. > > > > - I'd suggest explicitly stating that the only sane values > > for $early_late_divider are probably root, mountcritlocal, and > > mountcritremote. >=20 > Yeah, I ended up having to finish my message in a hurry (real life > called), and I forgot to add that I hadn't finished the rc.conf > man page entry yet. I am always hesitant to add too much info to > the rc.conf file, mostly because people who are determined to self > foot-shoot will ignore it anyway. :) That's fair. :) > I've added my proposed patch to rc.conf(5). Instead of talking about diskless systems I'd talk about having remote file systems in ${local_startup} such as if /usr were an nfs mount. The reason for this suggestion is that this and not being diskless are what makes the difference. All my diskless systems could actually have early_late_divider=3Droot since the roots contain everything in a chroot to allow them to be out of sync with the OS of the build system. You could also do something old school and have the base system on the local disk and have all packages be shared. That's certainly still popular in some places with lots of workstations. > > - diskless.8 should probably be updated to mentation that > > early_late_divider must be set to mountcritremote for the documented > > configuration to work. >=20 > I can do that as part of the change if you want, or you can do it, just l= et > me know. Please go ahead. diskless.8 annoys me because I don't like its suggested design. I really need to get around to doing a writeup on how I like to do diskless stuff. Probably after I work up a modified nanobsd build to handle it (in process for an upgrade from 4.10 to 6.0 on my cluster). > > - If you want to depend on an rc.conf value in /etc/rc, > > /etc/rc.d/rcconf.sh should die. early_late_divider is only non-zero > > every time through the loop by accident at this point.=20 >=20 > Ok, good plan. :) Based on our earlier conversation, I've also moved the > sourcing of rc.subr to after rc.initdiskless. In the non-diskless case,= =20 > this > should be a total noop, so I'm not worried about this part of the change, > and if we're going to do it, we should do it now. Although I didn't inclu= de > it in this patch, I'll remove rcconf.sh as well. OK. I might make rcconf.sh into a no-op that provides rcconf in the first commit and remove it for real in a day or so to make it easier to debug any inadvertent issues that result from increasing the number of scripts with no dependencies. > >Since > > rcconf.sh is no longer needed due to moving rc.d/initdiskless back > > to /etc/rc.initdiskless, it's safe to handle configuration in /etc/rc. >=20 > Sounds great to me! >=20 > Thanks as always for your feedback and careful thought here. You're welcome. I'm glad to see this is being done. Despite the increase in complexity in /etc/rc, I think we're well on our way to a more sane and comprehensible startup process. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --SLDf9lqlvOQaIe6s Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDmd00XY6L6fI4GtQRAoBkAKCJVPc6A6s85OrZZN8py1g6TGc+pwCdHo6X IJVOckMc6R6pAKJhoAhkXwg= =d6rC -----END PGP SIGNATURE----- --SLDf9lqlvOQaIe6s-- From owner-freebsd-rc@FreeBSD.ORG Sat Dec 10 08:58:41 2005 Return-Path: X-Original-To: freebsd-rc@FreeBSD.org Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4F1CC16A41F for ; Sat, 10 Dec 2005 08:58:41 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mail2.fluidhosting.com [204.14.90.12]) by mx1.FreeBSD.org (Postfix) with SMTP id 641C443D45 for ; Sat, 10 Dec 2005 08:58:40 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 63585 invoked by uid 399); 10 Dec 2005 08:57:13 -0000 Received: from localhost (HELO ?192.168.1.101?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 10 Dec 2005 08:57:13 -0000 Message-ID: <439A9857.9090003@FreeBSD.org> Date: Sat, 10 Dec 2005 00:56:55 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20051203) MIME-Version: 1.0 To: Brooks Davis References: <4398AB6A.3000209@FreeBSD.org> <20051208222013.GB5759@odin.ac.hmc.edu> <43996043.8020609@FreeBSD.org> <20051209193830.GA15097@odin.ac.hmc.edu> In-Reply-To: <20051209193830.GA15097@odin.ac.hmc.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-rc@FreeBSD.org Subject: Re: For Review: Latest update to rcorder patch 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: Sat, 10 Dec 2005 08:58:41 -0000 Brooks Davis wrote: > Instead of talking about diskless systems I'd talk about having remote > file systems in ${local_startup} Ok, how's this: +The early stage should contain all the services needed to +get the disks (local or remote) mounted so that the late +stage can include scripts contained in the directories +listed in the +.Va local_startup +variable (see below). +Thus, the two likely candidates for this value are +mountcritlocal for the typical system, +and mountcritremote if the system needs remote file +systems mounted to get access to the +.Va local_startup +directories. +For example when +.Pa /usr/local +is NFS mounted. >>> - diskless.8 should probably be updated to mentation that >>> early_late_divider must be set to mountcritremote for the documented >>> configuration to work. >> I can do that as part of the change if you want, or you can do it, just let >> me know. > > Please go ahead. Ok, how is this: +.Pp +One difference that you should pay particular attention to is +the value of +.Va local_startup +in +.Pa /etc/defaults/rc.conf . +A typical value for a +.Nm +boot is +.Va mountcritremote , +however your needs may be different. +.Pp The scripts provide four Suggestions for improvements are welcome, it's been a long day. > OK. I might make rcconf.sh into a no-op that provides rcconf in the > first commit and remove it for real in a day or so to make it easier to > debug any inadvertent issues that result from increasing the number of > scripts with no dependencies. Yeah, not only is this a factor, but I also failed to take into account another critical element. rcorder needs at least one script without any REQUIRE lines to know where to start. Right now that's rcconf.sh by design, but I think we need to replace that, rather than just delete rcconf.sh. This is one of the few times when I think a dummy dependency would be useful. I propose that I add a dummy dependency called START, and change everything that currently depends on rcconf to depend on START instead. Sound good? BTW, I noticed that there are several scripts that have no REQUIRE or nostart. Should those be updated? They are: ccd, gbde, mixer, and securelevel. Doug -- This .signature sanitized for your protection From owner-freebsd-rc@FreeBSD.ORG Sat Dec 10 08:58:53 2005 Return-Path: X-Original-To: freebsd-rc@FreeBSD.org Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1514C16A420 for ; Sat, 10 Dec 2005 08:58:53 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mail2.fluidhosting.com [204.14.90.12]) by mx1.FreeBSD.org (Postfix) with SMTP id 0DBC543D45 for ; Sat, 10 Dec 2005 08:58:51 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 64711 invoked by uid 399); 10 Dec 2005 08:58:50 -0000 Received: from localhost (HELO ?192.168.1.101?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 10 Dec 2005 08:58:50 -0000 Message-ID: <439A98C7.8040103@FreeBSD.org> Date: Sat, 10 Dec 2005 00:58:47 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20051203) MIME-Version: 1.0 To: Brooks Davis References: <4398AB6A.3000209@FreeBSD.org> <20051208222013.GB5759@odin.ac.hmc.edu> <43996043.8020609@FreeBSD.org> <20051209193830.GA15097@odin.ac.hmc.edu> In-Reply-To: <20051209193830.GA15097@odin.ac.hmc.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-rc@FreeBSD.org Subject: Re: For Review: Latest update to rcorder patch 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: Sat, 10 Dec 2005 08:58:53 -0000 Brooks Davis wrote: > Instead of talking about diskless systems I'd talk about having remote > file systems in ${local_startup} Ok, how's this: +The early stage should contain all the services needed to +get the disks (local or remote) mounted so that the late +stage can include scripts contained in the directories +listed in the +.Va local_startup +variable (see below). +Thus, the two likely candidates for this value are +mountcritlocal for the typical system, +and mountcritremote if the system needs remote file +systems mounted to get access to the +.Va local_startup +directories. +For example when +.Pa /usr/local +is NFS mounted. >>> - diskless.8 should probably be updated to mentation that >>> early_late_divider must be set to mountcritremote for the documented >>> configuration to work. >> I can do that as part of the change if you want, or you can do it, just let >> me know. > > Please go ahead. Ok, how is this: +.Pp +One difference that you should pay particular attention to is +the value of +.Va local_startup +in +.Pa /etc/defaults/rc.conf . +A typical value for a +.Nm +boot is +.Va mountcritremote , +however your needs may be different. +.Pp The scripts provide four Suggestions for improvements are welcome, it's been a long day. > OK. I might make rcconf.sh into a no-op that provides rcconf in the > first commit and remove it for real in a day or so to make it easier to > debug any inadvertent issues that result from increasing the number of > scripts with no dependencies. Yeah, not only is this a factor, but I also failed to take into account another critical element. rcorder needs at least one script without any REQUIRE lines to know where to start. Right now that's rcconf.sh by design, but I think we need to replace that, rather than just delete rcconf.sh. This is one of the few times when I think a dummy dependency would be useful. I propose that I add a dummy dependency called START, and change everything that currently depends on rcconf to depend on START instead. Sound good? BTW, I noticed that there are several scripts that have no REQUIRE or nostart. Should those be updated? They are: ccd, gbde, mixer, and securelevel. Doug -- This .signature sanitized for your protection From owner-freebsd-rc@FreeBSD.ORG Sat Dec 10 18:21:02 2005 Return-Path: X-Original-To: freebsd-rc@FreeBSD.org Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3627016A420; Sat, 10 Dec 2005 18:21:02 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id A907D43D5F; Sat, 10 Dec 2005 18:21:01 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id jBAIL0ow000864; Sat, 10 Dec 2005 10:21:00 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id jBAIL08g000863; Sat, 10 Dec 2005 10:21:00 -0800 Date: Sat, 10 Dec 2005 10:21:00 -0800 From: Brooks Davis To: Doug Barton Message-ID: <20051210182100.GA12946@odin.ac.hmc.edu> References: <4398AB6A.3000209@FreeBSD.org> <20051208222013.GB5759@odin.ac.hmc.edu> <43996043.8020609@FreeBSD.org> <20051209193830.GA15097@odin.ac.hmc.edu> <439A9857.9090003@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GvXjxJ+pjyke8COw" Content-Disposition: inline In-Reply-To: <439A9857.9090003@FreeBSD.org> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: freebsd-rc@FreeBSD.org Subject: Re: For Review: Latest update to rcorder patch 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: Sat, 10 Dec 2005 18:21:02 -0000 --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 10, 2005 at 12:56:55AM -0800, Doug Barton wrote: > Brooks Davis wrote: >=20 > >Instead of talking about diskless systems I'd talk about having remote > >file systems in ${local_startup}=20 >=20 > Ok, how's this: >=20 > +The early stage should contain all the services needed to > +get the disks (local or remote) mounted so that the late > +stage can include scripts contained in the directories > +listed in the > +.Va local_startup > +variable (see below). > +Thus, the two likely candidates for this value are > +mountcritlocal for the typical system, > +and mountcritremote if the system needs remote file > +systems mounted to get access to the > +.Va local_startup > +directories. > +For example when > +.Pa /usr/local > +is NFS mounted. That looks fine. > >>>- diskless.8 should probably be updated to mentation that > >>> early_late_divider must be set to mountcritremote for the documented > >>> configuration to work. > >>I can do that as part of the change if you want, or you can do it, just= =20 > >>let > >>me know. > > > >Please go ahead.=20 >=20 > Ok, how is this: >=20 > +.Pp > +One difference that you should pay particular attention to is > +the value of > +.Va local_startup > +in > +.Pa /etc/defaults/rc.conf . > +A typical value for a > +.Nm > +boot is > +.Va mountcritremote , > +however your needs may be different. > +.Pp > The scripts provide four That looks OK as well. > Suggestions for improvements are welcome, it's been a long day. >=20 > >OK. I might make rcconf.sh into a no-op that provides rcconf in the > >first commit and remove it for real in a day or so to make it easier to > >debug any inadvertent issues that result from increasing the number of > >scripts with no dependencies. >=20 > Yeah, not only is this a factor, but I also failed to take into account= =20 > another critical element. rcorder needs at least one script without any= =20 > REQUIRE lines to know where to start. Right now that's rcconf.sh by=20 > design, but I think we need to replace that, rather than just delete=20 > rcconf.sh. This is one of the few times when I think a dummy dependency= =20 > would be useful. I propose that I add a dummy dependency called START, an= d=20 > change everything that currently depends on rcconf to depend on START=20 > instead. Sound good? I'm not sure you actually need a dummy. NetBSD just lets early things have no REQUIRE lines (for instance cdd only contains "PROVIDE: disks"). There's no requirement that the tree have a single top. > BTW, I noticed that there are several scripts that have no REQUIRE or=20 > nostart. Should those be updated? They are: ccd, gbde, mixer, and=20 > securelevel. mixer is broken and should REQUIRE on cleanvar. The ccd script probably doesn't depend on anything but the obsolete rcconf.sh (which it currently gets from initrandom's BEFORE: disks), but gbde may depend on initrandom (I haven't read the code). I might just let initrandom take the top slot. securelevel is just plain wrong in the current setup. If it's going to do any good, it needs to come much earlier (NetBSD has it BEFORE: DAEMON which makes sense if it's supposed to secure your system from bad guys.) Right now it's in the noise at the end of the list due to a whole lot of IMO rather bogus BEFORE: securelevel entries. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --GvXjxJ+pjyke8COw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDmxyLXY6L6fI4GtQRAndsAKDRL2MkANE4ZuNWm0qk6XwXoHKtrgCggx0G 6aJ0BXFfsM2hMV4TG/9q8IM= =s8j/ -----END PGP SIGNATURE----- --GvXjxJ+pjyke8COw-- From owner-freebsd-rc@FreeBSD.ORG Sat Dec 10 19:42:35 2005 Return-Path: X-Original-To: freebsd-rc@FreeBSD.org Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C2E7716A41F for ; Sat, 10 Dec 2005 19:42:35 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mail2.fluidhosting.com [204.14.90.12]) by mx1.FreeBSD.org (Postfix) with SMTP id 33D1143D58 for ; Sat, 10 Dec 2005 19:42:35 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 26266 invoked by uid 399); 10 Dec 2005 19:42:34 -0000 Received: from localhost (HELO ?192.168.1.101?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 10 Dec 2005 19:42:34 -0000 Message-ID: <439B2FA8.2050704@FreeBSD.org> Date: Sat, 10 Dec 2005 11:42:32 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20051203) MIME-Version: 1.0 To: Brooks Davis References: <4398AB6A.3000209@FreeBSD.org> <20051208222013.GB5759@odin.ac.hmc.edu> <43996043.8020609@FreeBSD.org> <20051209193830.GA15097@odin.ac.hmc.edu> <439A9857.9090003@FreeBSD.org> <20051210182100.GA12946@odin.ac.hmc.edu> In-Reply-To: <20051210182100.GA12946@odin.ac.hmc.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-rc@FreeBSD.org Subject: Re: For Review: Latest update to rcorder patch 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: Sat, 10 Dec 2005 19:42:35 -0000 Brooks Davis wrote: > On Sat, Dec 10, 2005 at 12:56:55AM -0800, Doug Barton wrote: Thanks for the review on the man page stuff. >>> OK. I might make rcconf.sh into a no-op that provides rcconf in the >>> first commit and remove it for real in a day or so to make it easier to >>> debug any inadvertent issues that result from increasing the number of >>> scripts with no dependencies. >> Yeah, not only is this a factor, but I also failed to take into account >> another critical element. rcorder needs at least one script without any >> REQUIRE lines to know where to start. Right now that's rcconf.sh by >> design, but I think we need to replace that, rather than just delete >> rcconf.sh. This is one of the few times when I think a dummy dependency >> would be useful. I propose that I add a dummy dependency called START, and >> change everything that currently depends on rcconf to depend on START >> instead. Sound good? > > I'm not sure you actually need a dummy. NetBSD just lets early things > have no REQUIRE lines (for instance cdd only contains "PROVIDE: > disks"). There's no requirement that the tree have a single top. Hrrrm ... ok. I removed rcconf.sh and all it's REQUIRE lines, and nothing changed in the order. David O'Brien added a BEFORE: initrandom to dumpon so that it would be easier to debug panics related to it, and I don't see any reason to change that, so I think we're set there. >> BTW, I noticed that there are several scripts that have no REQUIRE or >> nostart. Should those be updated? They are: ccd, gbde, mixer, and >> securelevel. > > mixer is broken and should REQUIRE on cleanvar. The ccd script probably > doesn't depend on anything but the obsolete rcconf.sh (which it > currently gets from initrandom's BEFORE: disks), but gbde may depend on > initrandom (I haven't read the code). I might just let initrandom take > the top slot. securelevel is just plain wrong in the current setup. If > it's going to do any good, it needs to come much earlier (NetBSD has it > BEFORE: DAEMON which makes sense if it's supposed to secure your system > from bad guys.) Right now it's in the noise at the end of the list due > to a whole lot of IMO rather bogus BEFORE: securelevel entries. Ok. Changing mixer is an easy call (and ironically pushes it further down the order), but I'm not comfortable changing the others. Things work as they are, even if it is by accident, and I don't want to be the one who breaks it. :) Doug -- This .signature sanitized for your protection