From owner-freebsd-questions@FreeBSD.ORG Wed Mar 7 16:08:36 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 E5E5516A400 for ; Wed, 7 Mar 2007 16:08:36 +0000 (UTC) (envelope-from drewjenkinsjr@yahoo.com) Received: from web62215.mail.re1.yahoo.com (web62215.mail.re1.yahoo.com [69.147.75.14]) by mx1.freebsd.org (Postfix) with SMTP id AA0B213C478 for ; Wed, 7 Mar 2007 16:08:36 +0000 (UTC) (envelope-from drewjenkinsjr@yahoo.com) Received: (qmail 81610 invoked by uid 60001); 7 Mar 2007 16:08:35 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=Hy9f5owlia/t3a1ubT1pQJ0/4+8ePzZo95rnUFBIO3PuCbdxH8Ely/iQKg8z5QmJXxBXQRWZTZNn8F3azohmPgpks46UBWzTHrI3M6dz41fmFmGH6R70Nm+hd93OFP3wJ5ml8Gs0NsfKaXNCyZA5IoVhylvxkpASa2BQ6/nmfCM=; Received: from [67.46.93.3] by web62215.mail.re1.yahoo.com via HTTP; Wed, 07 Mar 2007 08:08:35 PST X-Mailer: YahooMailRC/468 YahooMailWebService/0.6.132.8 Date: Wed, 7 Mar 2007 08:08:35 -0800 (PST) From: Drew Jenkins To: freebsd-questions@freebsd.org MIME-Version: 1.0 Message-ID: <821143.79253.qm@web62215.mail.re1.yahoo.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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 16:08:37 -0000 >> ----- Original Message ----=0A>> From: Jerry McAllister =0A>> To: Drew Jenkins =0A>> Cc: freebsd-question= s@freebsd.org=0A>> Sent: Tuesday, March 6, 2007 7:46:26 PM=0A>> Subject: Re= : Setting Env=0A>>=0A>> >If you want the environment variable to=0A>> >be s= et for something that is taking place in the script, then=0A>> >that variab= le must either be set in a durable way in the parent=0A>> >environment or b= e set right there in the script that is using it.=0A>> >The rc.conf method = will make it available from the parent.=0A>> >That is the whole point of rc= .conf.=0A>>=0A>> Right. I figured that much. So, what do I actually put in = that file? I=0A>> tried these two options:=0A>>=0A>> setenv LD_LIBRARY_PATH= /usr/local/lib/mysql/=0A>>=0A>> export LD_LIBRARY_PATH=3D"/usr/local/lib/m= ysql/"=0A>>=0A>=0A>Well, setenv is a csh or tcsh command and isn't in sh an= d probably=0A>not in bash either (I haven't used bash).=0A>=0A=0AI am aware= of that. I was trying to explain how I used every_possible_combination of = things I could think of!=0A=0A>The export command is an sh and probably bas= h command and it=0A>doesn't exist in csh or tcsh.=0A>=0A=0AYes, yes. I know= .=0A=0A>=0A>>=0A>> It didn't like either, presumably because it's not calli= ng a bash or c-shell.=0A>> So, what should I put in /etc/rc.conf that will = achieve my objective?=0A>=0A>Look at other variable setting in rc.conf. Th= at should give you=0A>a good clue. For example, in my rc.conf I have seve= ral. One is:=0A> moused_enable=3D"YES"=0A>That makes the moused_enable va= riable have a value of YES.=0A>So, if you want LD_LIBRARY_PATH to have the = value of /usr/local/lib/mysql/=0A>might that not be:=0A> LD_LIBRARY_PATH= =3D"/usr/local/lib/mysql/"=0A>=0A=0AI tried that and posted yesterday that = that failed.=0A=0A>If you put it in the script that starts things - there n= eeds to be one -=0A>then it depends on the script language, csh/tcsh sh/bas= h.=0A>csh/tcsh use setenv and set=0A>sh [and bash] use set and variable_na= me=3Dvalue and needs an export to=0A>make it available to other entities be= sides the shell itself.=0A>You should look up the man pages on these things= and take a look=0A>at some other scripts such as those in /usr/local/etc/r= c.d for=0A>examples.=0A=0AWhat *things*? As far as scripts, this *should* b= e easy...=0A=0A#!/bin/csh=0Asetenv LD_LIBRARY_PATH /usr/local/lib/mysql/=0A= =0A...right? It doesn't work. Any other ideas?=0ADrew=0A=0A=0A=0A =0A______= ___________________________________________________________________________= ___=0ANever miss an email again!=0AYahoo! Toolbar alerts you the instant ne= w Mail arrives.=0Ahttp://tools.search.yahoo.com/toolbar/features/mail/