From owner-freebsd-questions@FreeBSD.ORG Sun Dec 9 18:12:46 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 BC32E16A418 for ; Sun, 9 Dec 2007 18:12:46 +0000 (UTC) (envelope-from freebsd-questions@slightlystrange.org) Received: from catflap.slightlystrange.org (cpc5-cmbg1-0-0-cust497.cmbg.cable.ntl.com [86.6.1.242]) by mx1.freebsd.org (Postfix) with ESMTP id 6DEA513C4DD for ; Sun, 9 Dec 2007 18:12:46 +0000 (UTC) (envelope-from freebsd-questions@slightlystrange.org) Received: by catflap.slightlystrange.org (Postfix, from userid 106) id 5567A617B; Sun, 9 Dec 2007 18:12:45 +0000 (GMT) Received: from torus.slightlystrange.org (torus.slightlystrange.org [10.1.3.50]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by catflap.slightlystrange.org (Postfix) with ESMTP id 96A236117 for ; Sun, 9 Dec 2007 18:12:44 +0000 (GMT) Received: (from danielby@localhost) by torus.slightlystrange.org (8.14.2/8.13.4/Submit) id lB9IChUJ020980 for freebsd-questions@freebsd.org; Sun, 9 Dec 2007 18:12:43 GMT (envelope-from freebsd-questions@slightlystrange.org) Date: Sun, 9 Dec 2007 18:12:42 +0000 From: Daniel Bye To: freebsd-questions@freebsd.org Message-ID: <20071209181242.GB1123@torus.slightlystrange.org> Mail-Followup-To: freebsd-questions@freebsd.org References: <200712091732.02238.lists-fbsd@shadypond.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="98e8jtXdkpgskNou" Content-Disposition: inline In-Reply-To: <200712091732.02238.lists-fbsd@shadypond.com> User-Agent: Mutt/1.4.2.3i X-PGP-Fingerprint: D349 B109 0EB8 2554 4D75 B79A 8B17 F97C 1622 166A Subject: Re: question about ordering of lines in rc.conf X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Bye List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2007 18:12:46 -0000 --98e8jtXdkpgskNou Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 09, 2007 at 05:31:59PM +0000, Pollywog wrote: > It appears that the order of the *_enable=3D"YES" lines in /etc/rc.conf i= s=20 > important. I am looking at a HOWTO for HPLIP in which the author suggest= s=20 > adding two lines in a certain order. Which two lines? It shouldn't matter - any script that relies on variables in /etc/rc.conf should read the entire file for anything it's interested in *before* doing anything with those values. The first line of any such script should be something like =2E /etc/rc.subr /etc/rc.subr defines a function called load_rc_config() which is responsible for reading /etc/rc.conf (among other things), and making all the variables in /etc/rc.conf available to the calling script. It (the calling script) is then responsible for checking the values of any it is interested in. Some older style rc scripts don't source /etc/rc.subr or call the=20 load_rc_config function, but handle finding their settings in a different way, but one which still finds all the necessary settings before doing any processing. >=20 > Since I recently had a problem with jabberd starting before myslq was rea= dy to=20 > accept connections and I just found that jabberd_enable=3D"YES" precedes= =20 > mysql_enable=3D"YES" in my rc.conf, I am wondering whether order is impor= tant. > Can anyone provide an answer? No - it is the values of the rcorder(8) block in each script that determines the order in which things are run. For older style scripts that don't=20 conform to the rcorder standard, the name of the file determines when it is run, not the order that variables are defined in /etc/rc.conf. Dan --=20 Daniel Bye _ ASCII ribbon campaign ( ) - against HTML, vCards and X - proprietary attachments in e-mail / \ --98e8jtXdkpgskNou Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD4DBQFHXDAaixf5fBYiFmoRAmgtAJilICfD4X4VnMxXCizZuAfjPTKnAJ9mGi+J NyJ3uAlQ2HDjlJQDJpmPEw== =CGdZ -----END PGP SIGNATURE----- --98e8jtXdkpgskNou--