From owner-freebsd-ports@FreeBSD.ORG Fri Nov 20 22:09:10 2009 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 355E7106568D for ; Fri, 20 Nov 2009 22:09:10 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id D1CC78FC1C for ; Fri, 20 Nov 2009 22:09:09 +0000 (UTC) Received: (qmail 30256 invoked by uid 399); 20 Nov 2009 22:09:08 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 20 Nov 2009 22:09:08 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B07138A.5080301@FreeBSD.org> Date: Fri, 20 Nov 2009 14:09:14 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: RW References: <20091120140209.0902724a@gumby.homeunix.com> In-Reply-To: <20091120140209.0902724a@gumby.homeunix.com> X-Enigmail-Version: 0.96.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: ports@freebsd.org Subject: Re: rc.d scripts and REQUIRE part X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2009 22:09:10 -0000 RW wrote: > On Fri, 20 Nov 2009 11:38:58 +0100 > Xavier Beaudouin wrote: > >> Hello, >> >> I am trying to understand how to customize rc.d scripts to get the >> right startup sequence for all daemons. >> >> Seems we have (my case havp, but it is also the same problem for >> example monit) : >> >> /usr/local/etc/rc.d/havp : >> >> # PROVIDE: havp >> # REQUIRE: DAEMON cleanvar >> # BEFORE: LOGIN >> >> But in my configuration, I need ... clamd to be started before havp. >> >> I have no garantee that clamd is started before havp. >> >> Is there any hint (I had a look in handbook, but didn't find yet) a >> way to add some REQUIRE stuff for a rc script inside, for >> example /etc/rc.conf ? To answer this question directly, no. > I would suggest that you don't modify any scripts because you will > have to maintain them. I'd create some dummy scripts in /usr/local/etc > to provide the ordering e.g. > > #!/bin/sh > # > # PROVIDE: PREHAVP > # REQUIRE: clamd > # BEFORE: havp I think we're in a great stage of rc.d adoption when a user is able to provide another user the exactly correct answer. :) One tiny correction, you would want to put this dummy script in /usr/local/etc/rc.d/. Also make sure that it's set executable (chmod 755). The name of the script won't matter, but it's generally a good idea to make the name of the file match what's in the PROVIDE line to make debugging easier. hth, Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/