From owner-freebsd-questions@FreeBSD.ORG Sun Dec 9 17:58:43 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68A9B16A419 for ; Sun, 9 Dec 2007 17:58:43 +0000 (UTC) (envelope-from pauls@utdallas.edu) Received: from smtp3.utdallas.edu (smtp3.utdallas.edu [129.110.10.49]) by mx1.freebsd.org (Postfix) with ESMTP id 4C59E13C442 for ; Sun, 9 Dec 2007 17:58:43 +0000 (UTC) (envelope-from pauls@utdallas.edu) Received: from [192.168.2.102] (unknown [24.175.90.48]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp3.utdallas.edu (Postfix) with ESMTP id 7C95D654FD for ; Sun, 9 Dec 2007 11:58:42 -0600 (CST) Date: Sun, 09 Dec 2007 11:58:47 -0600 From: Paul Schmehl To: freebsd-questions@freebsd.org Message-ID: <7070AAA9B18DEF4507E20502@paul-schmehls-powerbook59.local> In-Reply-To: <200712091732.02238.lists-fbsd@shadypond.com> References: <200712091732.02238.lists-fbsd@shadypond.com> X-Mailer: Mulberry/4.0.8 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Re: question about ordering of lines in rc.conf X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2007 17:58:43 -0000 --On December 9, 2007 5:31:59 PM +0000 Pollywog wrote: > It appears that the order of the *_enable="YES" lines in /etc/rc.conf is > important. I am looking at a HOWTO for HPLIP in which the author > suggests adding two lines in a certain order. > > Since I recently had a problem with jabberd starting before myslq was > ready to accept connections and I just found that jabberd_enable="YES" > precedes mysql_enable="YES" in my rc.conf, I am wondering whether order > is important. Can anyone provide an answer? > > I solved the problem I was having with jabberd but in a different way. > /etc/rc.conf is parsed by the daemon's startup script. So, the order of things in /etc/rc.conf does not determine which daemon is started first. That is done in /etc/rc.d and /usr/local/etc/rc.d. Daemons are started in alphabetical order unless the startup script is preceded by a number but they also honor the PROVIDE and REQUIRE keywords which determines what has to start before a daemon can be started. So, if you need a daemon to start before another daemon, rename the startup script to begin with a number. See man 8 rc, man 8 rcorder, especially this: The scripts within each directory are executed in lexicographical order. If a specific order is required, numbers may be used as a prefix to the existing filenames, so for example 100.foo would be executed before 200.bar; without the numeric prefixes the opposite would be true. Paul Schmehl (pauls@utdallas.edu) Senior Information Security Analyst The University of Texas at Dallas http://www.utdallas.edu/ir/security/