From owner-freebsd-current@FreeBSD.ORG Tue Sep 28 08:56:47 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A6BEA16A4DA for ; Tue, 28 Sep 2004 08:56:47 +0000 (GMT) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id A3B7E43D2D for ; Tue, 28 Sep 2004 08:56:45 +0000 (GMT) (envelope-from keramida@linux.gr) Received: from orion.daedalusnetworks.priv (host5.bedc.ondsl.gr [62.103.39.229])i8S8ugls029558; Tue, 28 Sep 2004 11:56:42 +0300 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) i8S8ugsO001731; Tue, 28 Sep 2004 11:56:42 +0300 (EEST) (envelope-from keramida@linux.gr) Received: (from keramida@localhost)i8S8ufpL001730; Tue, 28 Sep 2004 11:56:41 +0300 (EEST) (envelope-from keramida@linux.gr) Date: Tue, 28 Sep 2004 11:56:41 +0300 From: Giorgos Keramidas To: Jose M Rodriguez Message-ID: <20040928085641.GA1647@orion.daedalusnetworks.priv> References: <20040927171630.GB4684@orion.daedalusnetworks.priv> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: current@freebsd.org Subject: Re: WIP: /etc/rc.d/xdm RCORDER problems X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Sep 2004 08:56:47 -0000 On 2004-09-27 19:38, Jose M Rodriguez wrote: >On Mon, 27 Sep 2004 20:16:30 +0300, Giorgos Keramidas wrote: >>On 2004-09-27 14:50, Jose M Rodriguez wrote: >> >>Some of the rc.d scripts you listed above have a `REQUIRE: LOGIN' line. >>This will create a dependency problem if combined with a line that contains >>`BEFORE: LOGIN', since a script cannot depend on LOGIN to start but start >>before LOGIN. > > I don't think this may be a REQUIRE issue, but a BEFORE: one AFAICT, these two can work in two ways: 1. As complementary information. When two scripts B and C depend on the same script A and the order of B, C *is* important BEFORE can be used to ensure the correct order is used. 2. As implicit dependency information specifiers. If B specifies that it should start `BEFORE: C' and B depends on A, then C also depends (indirectly) on A. I think I prefer the first way of using BEFORE, which is what you're trying to do. But I may be wrong or I may have misunderstood the way the keywords work. > I rather puzzle that, ading a simple script (xdm) I can't manage to put it > at the very end of rcorder (I have race problems between gettys from > /etc/ttys and xdm). What happens if you copy the logic of the existing scripts and add only this line to your xdm script? REQUIRE: LOGIN > It, at a minimum, annoying. I can sure what is. But rcorder seems to be > very sensitive to 'string order'. >>The scripts that depend on LOGIN and are listed above are: >> >> /etc/rc.d/syscons:# REQUIRE: LOGIN usbd >> /etc/rc.d/sshd:# REQUIRE: LOGIN >> /etc/rc.d/sendmail:# REQUIRE: LOGIN >> /etc/rc.d/archdep:# REQUIRE: LOGIN >> /etc/rc.d/abi:# REQUIRE: LOGIN >> /etc/rc.d/cron:# REQUIRE: LOGIN >> /etc/rc.d/devfs:# REQUIRE: LOGIN >> /etc/rc.d/jail:# REQUIRE: LOGIN >> /etc/rc.d/pcvt:# REQUIRE: LOGIN >> /etc/rc.d/othermta:# REQUIRE: LOGIN >> /etc/rc.d/msgs:# REQUIRE: LOGIN >> /etc/rc.d/mixer:# REQUIRE: LOGIN usbd >> /etc/rc.d/inetd:# REQUIRE: DAEMON LOGIN > > And ... why? sshd, sendmail, inetd, othermta ... It's no sense. All this > are network servers that must be on NETWORK, REQUIRE NETWORKING and be run > BEFORE LOGIN ?no?. Essentially the current `LOGIN' script pulls in (via `DAEMON') a dependency on two important things that these servers might need to operate normally. The NETWORKING and SERVERS dependencies. These ensure that basic networking support has been configured and all the remote filesystems have been already mounted[1] when these servers start. I'm not sure if all this is helpful for what you're trying to do. If not, then the people at freebsd-rc@ will probably know a lot more details about the design/rationale of the way each script works. - Giorgos ----- References ----- [1] This is necessary for at least the sshd, sendmail, cron and inetd because user information or other data for authentication/access-control might be on remote filesystems (i.e. when booting diskless or when using shared space for `/home' which is exported by an NFS server).