From owner-freebsd-questions@FreeBSD.ORG Wed Mar 7 05:02:05 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 26AED16A401 for ; Wed, 7 Mar 2007 05:02:05 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout5.cac.washington.edu (mxout5.cac.washington.edu [140.142.32.135]) by mx1.freebsd.org (Postfix) with ESMTP id 0556C13C428 for ; Wed, 7 Mar 2007 05:02:05 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout5.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id l27524X4016317 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 6 Mar 2007 21:02:04 -0800 X-Auth-Received: from [192.168.10.41] (c-67-187-172-183.hsd1.ca.comcast.net [67.187.172.183]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id l27523Qh025148 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 6 Mar 2007 21:02:04 -0800 Message-ID: <45EE4749.8080808@u.washington.edu> Date: Tue, 06 Mar 2007 21:02:01 -0800 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.9 (X11/20070122) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <812894.39097.qm@web62205.mail.re1.yahoo.com> In-Reply-To: <812894.39097.qm@web62205.mail.re1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.0.289146, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2007.3.6.205433 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='LEO_OBFU_SUBJ_RE 0.1, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: Re: Setting Env 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, 07 Mar 2007 05:02:05 -0000 Drew Jenkins wrote: > ----- Original Message ---- > From: Jerry McAllister > To: Drew Jenkins > Cc: freebsd-questions@freebsd.org > Sent: Tuesday, March 6, 2007 7:46:26 PM > Subject: Re: Setting Env > >> If you want the environment variable to >> be set for something that is taking place in the script, then >> that variable must either be set in a durable way in the parent >> environment or be set right there in the script that is using it. >> The rc.conf method will make it available from the parent. >> That is the whole point of rc.conf. > > Right. I figured that much. So, what do I actually put in that file? I tried these two options: > > setenv LD_LIBRARY_PATH /usr/local/lib/mysql/ > > export LD_LIBRARY_PATH="/usr/local/lib/mysql/" > > > It didn't like either, presumably because it's not calling a bash or c-shell. So, what should I put in /etc/rc.conf that will achieve my objective? > TIA, > Drew LD_LIBRARY_PATH=/usr/local/lib/mysql/ not work for you? Why not source environment variables from an outside script / rc-file? It's better / smarter in the long run, IMHO. -Garrett