From owner-freebsd-questions@FreeBSD.ORG Wed Sep 3 12:30:38 2008 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 928BA1065676 for ; Wed, 3 Sep 2008 12:30:38 +0000 (UTC) (envelope-from fbsd06+ZN=a5fdc564@mlists.homeunix.com) Received: from mxout-03.mxes.net (mxout-03.mxes.net [216.86.168.178]) by mx1.freebsd.org (Postfix) with ESMTP id 628278FC16 for ; Wed, 3 Sep 2008 12:30:38 +0000 (UTC) (envelope-from fbsd06+ZN=a5fdc564@mlists.homeunix.com) Received: from gumby.homeunix.com. (unknown [87.81.140.128]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id CA3F023E408; Wed, 3 Sep 2008 08:30:36 -0400 (EDT) Date: Wed, 3 Sep 2008 13:30:34 +0100 From: RW To: freebsd-questions@freebsd.org Message-ID: <20080903133034.0b90ea2b@gumby.homeunix.com.> In-Reply-To: <20080903112814.2e5965ae.freebsd@edvax.de> References: <20080903104925.3b1e9535@nogrod.nicoelro.net> <20080903112814.2e5965ae.freebsd@edvax.de> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Polytropon Subject: Re: Setting an environment var at boot 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: Wed, 03 Sep 2008 12:30:38 -0000 On Wed, 3 Sep 2008 11:28:14 +0200 Polytropon wrote: > On Wed, 3 Sep 2008 10:49:25 +0200, Nicolas Letellier > wrote: > > What file do you advice? > > Unclean, but maybe "early" enough in the boot process: /etc/rc.local. > This file won't be touched at port's or system's update. I don't think that would work, since rc.local is sourced from a subshell. > Much more unclean, but certainly earlier: /etc/rc itself. Thile file > is examined during system update. > > I've not tried it myself, but I think you could probably just export the variable in rc.conf (provided that the value isn't required in the rc.d script itself, for initialization, before run_rc_command is executed). You can also put per script configuration in the file /etc/rc.conf.d/ where is whatever the rc.d script sets as "name".