Date: Wed, 3 Sep 2008 13:30:34 +0100 From: RW <fbsd06@mlists.homeunix.com> To: freebsd-questions@freebsd.org Cc: Polytropon <freebsd@edvax.de> Subject: Re: Setting an environment var at boot 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>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 3 Sep 2008 11:28:14 +0200 Polytropon <freebsd@edvax.de> wrote: > On Wed, 3 Sep 2008 10:49:25 +0200, Nicolas Letellier > <nicolas@nicoelro.net> 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/<name> where <name> is whatever the rc.d script sets as "name".
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080903133034.0b90ea2b>