Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Mar 2007 14:33:01 -0500
From:      Jerry McAllister <jerrymc@msu.edu>
To:        Drew Jenkins <drewjenkinsjr@yahoo.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Setting Env
Message-ID:  <20070306193301.GA10514@gizmo.acns.msu.edu>
In-Reply-To: <86221.5189.qm@web62202.mail.re1.yahoo.com>
References:  <86221.5189.qm@web62202.mail.re1.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 06, 2007 at 11:21:19AM -0800, Drew Jenkins wrote:

> 20Hi;
> For some reason, I need to run this:
> 
> setenv LD_LIBRARY_PATH /usr/local/lib/mysql/
> 
> to get my Zope instances up and running. I'm trying to figure out how to 
> automate that. I wrote a little script:
> 
> #!/bin/csh
> setenv LD_LIBRARY_PATH /usr/local/lib/mysql/
> 
> and put it here:
> 
> /usr/local/etc/rc.d/mysql_setenv
> chmod +x /usr/local/etc/rc.d/mysql_setenv
> 
> I can run that little script with no errors. However, it *doesn't* set 
> the environment!
> 
> # echo $shell
> # csh
> 
> What gives?

I think does the setenv for the shell started for that script only.
Once the script is finished, that goes away.   You either need to 
put it in the script where you want to use the value or in your .cshrc 
file so it is in your main environment.

////jerry

> TIA,
> Drew
> 
> 
> 
> 
>  
> ____________________________________________________________________________________
> Looking for earth-friendly autos? 
> Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
> http://autos.yahoo.com/green_center/
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070306193301.GA10514>