Re: [stupid question] setting env variables globally
On Fri, Oct 19, 2007 at 04:14:12PM +, Aryeh M. Friedman wrote: Is there any way to set the default value of a enviromental variable globally. Specifically I want JAVA_VERSION to default to "1.6" unless the user sets it other wise. By global I mean no matter how something is invoked (command line, script, GUI, IPC trigger, etc.) if it checks the value of the var it gets the same value (and I want to do this system wide) For userland stuff that is invoked after a login (i.e. In some user's login context), I have a master profile I keep in /usr/local/etc/.myprofile. I then source this from the .profile or .bashrc in a given user's account. If you need this for cron jobs, there is a way to set environment variables in the crontab entry IIRC... HTH, Tim Daneliuk [EMAIL PROTECTED] PGP Key: http://www.tundraware.com/PGP/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: [stupid question] setting env variables globally
On Fri, Oct 19, 2007 at 04:14:12PM +, Aryeh M. Friedman wrote: > Is there any way to set the default value of a enviromental variable > globally. Specifically I want JAVA_VERSION to default to "1.6" unless > the user sets it other wise. By global I mean no matter how something > is invoked (command line, script, GUI, IPC trigger, etc.) if it checks > the value of the var it gets the same value (and I want to do this > system wide) You can take a look at login.conf(5) which probably can provide what you want. Depending on exactly how and when (and from where) a process is started this might not work, but is probably the best that can be done without hacking the kernel source code. A process normally inherits the environment from its parent process. When a process calls some of the exec(3) functions to start a new program it can also provide a completely new environment which can be completely independent of the parent's. The settings in login.conf(5) only (AFAICT) affects processes whose ancestry can be traced back to a login(1) instance, and where the environment hasn't been changed along the way. This should cover most of the processes you are interested in but perhaps not quite all of them. If you really want *all* processes to have a certain environment variable set to a given value you will have to modify the execve(2) system call. I don't recommend doing this unless you know *exactly* what you are doing and the possible consequences thereof. -- Erik Trulsson [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: [stupid question] setting env variables globally
On Oct 19, 2007, at 9:14 AM, Aryeh M. Friedman wrote: Is there any way to set the default value of a enviromental variable globally. Specifically I want JAVA_VERSION to default to "1.6" unless the user sets it other wise. By global I mean no matter how something is invoked (command line, script, GUI, IPC trigger, etc.) if it checks the value of the var it gets the same value (and I want to do this system wide) Setting variables in /etc/profile and /etc/csh.cshrc (respectively) will do it for the common shells; or perhaps you might look at /etc/ login.conf... -- -Chuck ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
[stupid question] setting env variables globally
Is there any way to set the default value of a enviromental variable globally. Specifically I want JAVA_VERSION to default to "1.6" unless the user sets it other wise. By global I mean no matter how something is invoked (command line, script, GUI, IPC trigger, etc.) if it checks the value of the var it gets the same value (and I want to do this system wide) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: setting ENV VARs in make.conf/ports.conf ?
I'd direct this question to the ports@ mailing list. fair enough. thanks! ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: setting ENV VARs in make.conf/ports.conf ?
On Mon, 23 Apr 2007, snowcrash+freebsd wrote: hi, i've installed FreeBSD v6.2-RELEASE, plus 'portconf' & 'ccache' from ports. i've setup, [..] is there a _consistent_ way of turning off NOCCACHE via the ports.conf? thanks! I'd direct this question to the ports@ mailing list. -Garrett ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
setting ENV VARs in make.conf/ports.conf ?
hi, i've installed FreeBSD v6.2-RELEASE, plus 'portconf' & 'ccache' from ports. i've setup, /etc/make.conf - PERL_VER=5.8.8 PERL_VERSION=5.8.8 USE_OPENSSL_PORT=true OPENSSLBASE=/usr/local USE_OPENSSH_PORT=true WITHOUT_X11=yes CPUTYPE?=pentium-mmx CFLAGS= -O2 -pipe COPTFLAGS= -O2 -pipe ## Begin portconf settings ## Do not touch these lines .if !empty(.CURDIR:M/usr/ports*) && exists(/usr/local/libexec/portconf) _PORTCONF!=/usr/local/libexec/portconf .for i in ${_PORTCONF:S/|/ /g} ${i:S/%/ /g} .endfor .endif ## End portconf settings .if !defined(NOCCACHE) CC=/usr/local/libexec/ccache/cc CXX=/usr/local/libexec/ccache/c++ CPP=/usr/local/libexec/ccache/cpp .endif - so that i can turn OFF use of ccache for individual ports. i find that different ports 'respond' only to specific ways of setting the NOCCACHE var. e.g., in, cat /usr/local/etc/ports.conf - *:\ CFLAGS= -O2 -pipe -funroll-loops -s -frename-registers -fomit-frame-pointer | \ CXXFLAGS= -O2 -pipe -funroll-loops -s -frename-registers databases/sqlite3-threads:NOCCACHE=true | \ WITHOUT_DEBUG=true|WITH_DOCS=true|WITH_FTS1=true|WITH_TCLWRAPPER=true|BATCH=Yes sysutils/pflogx:MAKE_ENV= NOCCACHE=true | \ WITH_EXPAT=true|BATCH=Yes - pflogx and sqlite3 require DIFFERENT specifications of NOCCACHE ... swapping formate, e.g., causes the conditional ".if !defined(NOCCACHE)" to fail; meaning, that the CC/CXX/CPP defs pointing to ccahce/* are oncorrectly used. is this expected/normal? i would've expected the same method of defining ENV VAR knobs ... is there a _consistent_ way of turning off NOCCACHE via the ports.conf? thanks! ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
Well, if the problem is with Zope, then why is the env variable not set after reboot? The problem, therefore, is not with Zope, but rather with setting the variable. Drew2 Jerry McAllister <[EMAIL PROTECTED]> wrote: On Thu, Mar 08, 2007 at 01:07:10PM -0800, Drew Jenkins wrote: #!/bin/sh if [ -n "$LD_LIBRARY_PATH" ] ; then export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib/mysql" echo "Exporting LD_LIBRARY_PATH to /usr/local/lib/mysql because -n '$LD_LIBRARY_PATH' held true." >> /var/log/zz_mysql_start.log else export LD_LIBRARY_PATH="/usr/local/lib/mysql" echo "Exporting LD_LIBRARY_PATH to /usr/local/lib/mysql, -n '$LD_LIBRARY_PATH' did not hold true." >> /var/log/zz_mysql_start.log fi cd /usr/local/zope/ if ./instance1/bin/zopectl stop ; then echo "Stopping zopectl instance 1." >> /var/log/zz_mysql_start.log fi if ./instance1/bin/zopectl start ; then echo "Restarting zopectl instance 1." >> /var/log/zz_mysql_start.log fi if ./instance2/bin/zopectl stop ; then echo "Stopping zopectl instance 2." >> /var/log/zz_mysql_start.log fi if ./instance2/bin/zopectl start ; then echo "Restarting zopectl instance 2." >> /var/log/zz_mysql_start.log fi sleep 3 echo "ending zz_mysql_start.sh at: `date`" >> /var/log/zz_mysql_start.log echo " " >> /var/log/zz_mysql_start.log Exporting LD_LIBRARY_PATH to /usr/local/lib/mysql, -n '/usr/local/lib/mysql' did not hold true. Stopping zopectl instance 1. Restarting zopectl instance 1. Stopping zopectl instance 2. Restarting zopectl instance 2. ending zz_mysql_start.sh at: Thu Mar 8 14:57:47 UTC 2007 It kicked out that output when I tested it and also when I rebooted the server. However, Zope was still not up. I should qualify that. Zope "appears" to be up, but when I try to access it TTW (the ZMI) I can't reach the site. TIA, Drew Sounds like your problem is with Zope somewhere and not the startup script per se - though it could be something missing in the startup. I have never used Zope. jerry If the user has a home, why not add it to /etc/profile, or ~/.profile? It's only a problem if it's a daemon user without a home.. that's when stuff gets a bit tricky with the profile setup. -Garrett ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
Well, if the problem is with Zope, then why is the env variable not set after reboot? The problem, therefore, is not with Zope, but rather with setting the variable. Drew2 Jerry McAllister <[EMAIL PROTECTED]> wrote: On Thu, Mar 08, 2007 at 01:07:10PM -0800, Drew Jenkins wrote: > #!/bin/sh > > if [ -n "$LD_LIBRARY_PATH" ] ; then > export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib/mysql" > echo "Exporting LD_LIBRARY_PATH to /usr/local/lib/mysql because -n > '$LD_LIBRARY_PATH' held true." >> /var/log/zz_mysql_start.log > else > export LD_LIBRARY_PATH="/usr/local/lib/mysql" > echo "Exporting LD_LIBRARY_PATH to /usr/local/lib/mysql, -n > '$LD_LIBRARY_PATH' did not hold true." >> /var/log/zz_mysql_start.log > fi > > cd /usr/local/zope/ > > if ./instance1/bin/zopectl stop ; then > echo "Stopping zopectl instance 1." >> /var/log/zz_mysql_start.log > fi > > if ./instance1/bin/zopectl start ; then > echo "Restarting zopectl instance 1." >> /var/log/zz_mysql_start.log > fi > > if ./instance2/bin/zopectl stop ; then > echo "Stopping zopectl instance 2." >> /var/log/zz_mysql_start.log > fi > > if ./instance2/bin/zopectl start ; then > echo "Restarting zopectl instance 2." >> /var/log/zz_mysql_start.log > fi > > > sleep 3 > echo "ending zz_mysql_start.sh at: `date`" >> /var/log/zz_mysql_start.log > echo " " >> /var/log/zz_mysql_start.log > > Exporting LD_LIBRARY_PATH to /usr/local/lib/mysql, -n '/usr/local/lib/mysql' > did not hold true. > Stopping zopectl instance 1. > Restarting zopectl instance 1. > Stopping zopectl instance 2. > Restarting zopectl instance 2. > ending zz_mysql_start.sh at: Thu Mar 8 14:57:47 UTC 2007 > > It kicked out that output when I tested it and also when I rebooted the > server. However, Zope was still not up. I should qualify that. Zope "appears" > to be up, but when I try to access it TTW (the ZMI) I can't reach the site. > TIA, > Drew Sounds like your problem is with Zope somewhere and not the startup script per se - though it could be something missing in the startup. I have never used Zope. jerry > > - > TV dinner still cooling? > Check out "Tonight's Picks" on Yahoo! TV. > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" - Get your own web address. Have a HUGE year through Yahoo! Small Business. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
On Thu, Mar 08, 2007 at 01:07:10PM -0800, Drew Jenkins wrote: > #!/bin/sh > > if [ -n "$LD_LIBRARY_PATH" ] ; then > export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib/mysql" > echo "Exporting LD_LIBRARY_PATH to /usr/local/lib/mysql because -n > '$LD_LIBRARY_PATH' held true." >> /var/log/zz_mysql_start.log > else > export LD_LIBRARY_PATH="/usr/local/lib/mysql" > echo "Exporting LD_LIBRARY_PATH to /usr/local/lib/mysql, -n > '$LD_LIBRARY_PATH' did not hold true." >> /var/log/zz_mysql_start.log > fi > > cd /usr/local/zope/ > > if ./instance1/bin/zopectl stop ; then > echo "Stopping zopectl instance 1." >> /var/log/zz_mysql_start.log > fi > > if ./instance1/bin/zopectl start ; then > echo "Restarting zopectl instance 1." >> /var/log/zz_mysql_start.log > fi > > if ./instance2/bin/zopectl stop ; then > echo "Stopping zopectl instance 2." >> /var/log/zz_mysql_start.log > fi > > if ./instance2/bin/zopectl start ; then > echo "Restarting zopectl instance 2." >> /var/log/zz_mysql_start.log > fi > > > sleep 3 > echo "ending zz_mysql_start.sh at: `date`" >> /var/log/zz_mysql_start.log > echo " " >> /var/log/zz_mysql_start.log > > Exporting LD_LIBRARY_PATH to /usr/local/lib/mysql, -n '/usr/local/lib/mysql' > did not hold true. > Stopping zopectl instance 1. > Restarting zopectl instance 1. > Stopping zopectl instance 2. > Restarting zopectl instance 2. > ending zz_mysql_start.sh at: Thu Mar 8 14:57:47 UTC 2007 > > It kicked out that output when I tested it and also when I rebooted the > server. However, Zope was still not up. I should qualify that. Zope "appears" > to be up, but when I try to access it TTW (the ZMI) I can't reach the site. > TIA, > Drew Sounds like your problem is with Zope somewhere and not the startup script per se - though it could be something missing in the startup. I have never used Zope. jerry > > - > TV dinner still cooling? > Check out "Tonight's Picks" on Yahoo! TV. > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
#!/bin/sh if [ -n "$LD_LIBRARY_PATH" ] ; then export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib/mysql" echo "Exporting LD_LIBRARY_PATH to /usr/local/lib/mysql because -n '$LD_LIBRARY_PATH' held true." >> /var/log/zz_mysql_start.log else export LD_LIBRARY_PATH="/usr/local/lib/mysql" echo "Exporting LD_LIBRARY_PATH to /usr/local/lib/mysql, -n '$LD_LIBRARY_PATH' did not hold true." >> /var/log/zz_mysql_start.log fi cd /usr/local/zope/ if ./instance1/bin/zopectl stop ; then echo "Stopping zopectl instance 1." >> /var/log/zz_mysql_start.log fi if ./instance1/bin/zopectl start ; then echo "Restarting zopectl instance 1." >> /var/log/zz_mysql_start.log fi if ./instance2/bin/zopectl stop ; then echo "Stopping zopectl instance 2." >> /var/log/zz_mysql_start.log fi if ./instance2/bin/zopectl start ; then echo "Restarting zopectl instance 2." >> /var/log/zz_mysql_start.log fi sleep 3 echo "ending zz_mysql_start.sh at: `date`" >> /var/log/zz_mysql_start.log echo " " >> /var/log/zz_mysql_start.log Exporting LD_LIBRARY_PATH to /usr/local/lib/mysql, -n '/usr/local/lib/mysql' did not hold true. Stopping zopectl instance 1. Restarting zopectl instance 1. Stopping zopectl instance 2. Restarting zopectl instance 2. ending zz_mysql_start.sh at: Thu Mar 8 14:57:47 UTC 2007 It kicked out that output when I tested it and also when I rebooted the server. However, Zope was still not up. I should qualify that. Zope "appears" to be up, but when I try to access it TTW (the ZMI) I can't reach the site. TIA, Drew - TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
On Thu, Mar 08, 2007 at 04:20:40AM -0800, Drew Jenkins wrote: > 20I wrote the following script (with your help) to solve the problem I'm > having with setting the MySQL environment and getting Zope up after the fact. > I have saved this in /usr/local/etc/rc.d/ If I run this after the machine > reboots, all is well. If I simply let it run in the reboot sequence, it > doesn't do it's job! The sleep command is to give the server a chance to > finish all its other bootup sequences, since that appears to be the factor > messing things up. But it doesn't work!! What can I do to tweak this to do > what I need it to do? > TIA, > Drew > > #!/bin/sh > > sleep 60 > if [ -n "$LD_LIBRARY_PATH" ] ; then > export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib/mysql" > else > export LD_LIBRARY_PATH="/usr/local/lib/mysql" > fi > > cd /usr/local/zope/ > ./instance1/bin/zopectl stop > ./instance1/bin/zopectl start > ./instance2/bin/zopectl stop > ./instance2/bin/zopectl start > You don't suppose, if you made a file named 'rctest.sh' and put it in your /usr/local/etc/rc.d directory owned by root:wheel with execute permissions contain the following, that you might learn something? Then, take a look at /rctest.log after you reboot. jerry - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #!/bin/sh # test writing a file echo "Starting rctest.sh at: `date`" >> /rctest.log case "$1" in start) echo "running rctest.sh with a start at: `date`" >> /rctest.log ;; stop) echo "Running rctest.sh with a stop at: `date`" >> /rctest.log ;; *)echo "Calling args for rctest.sh are start and stop" >> /rctest.log ;; esac sleep 3 echo "ending rctest.sh at: `date`" >> /rctest.log echo " " >> /rctest.log ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
On Thu, Mar 08, 2007 at 08:31:23AM -0800, Drew Jenkins wrote: > Anyway, I suggest first just working on getting any script to run > at boot time - or rather at the time the system comes up for multi- > user, but that stuff does not run when it comes up to single-user. > > So, my next suggestion is to make any little ole script with a couple > of echo-s in it to demonstration that it runs and put that it > the /usr/local/etc/rc.d directory with the correct permissions > and name, etc. NOTE, someone in an earlier post clarified the .sh > issue with information that was new to me about the system looking > for certain flags inside the file if the file name does not have > the .sh ending. Go back and check that out, but the this, assume > you have to have .sh and execute permission. > > You do not have to have a start/stop/restart check in the script if > the script will always just run regardless of parameter. But, > what the system does is call the script with a parameter of 'start' > at boot time and a parameter of 'stop' at shutdown time. > > But for the sake of the primative test, those can be omitted. > > Let's say you call the scriptfile: 'rctest.sh' > Put something like: > > #!/bin/sh > echo "running rctest.sh, got this far" > > # Add any any other stuff you want to test > > echo "running rctest.sh, finished" > > > Now, if the bare skeleton works, then start adding more parts > to it until you get to where everything works. Add more echo-s > if they are useful. But I've done that (except name it *.sh, which I just did). And I'm not at the server. It's on the other side of the globe. So I can't watch echo's pop up as it boots. Here's my script: #!/bin/sh sleep 60 if [ -n "$LD_LIBRARY_PATH" ] ; then export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib/mysql" else export LD_LIBRARY_PATH="/usr/local/lib/mysql" fi cd /usr/local/zope/ ./instance1/bin/zopectl stop ./instance1/bin/zopectl start ./instance2/bin/zopectl stop ./instance2/bin/zopectl start The sleep is in there to try to get it to run after everything else has come up, but it doesn't help. If I run that script after boot, everything works out fine. > You could also look up how to get your messages written to a log Hey, now there's an idea! How do I do that? Or where do I go to study how to do that? TIA, Drew Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games. http://games.yahoo.com/games/front ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
On Thu, Mar 08, 2007 at 08:31:23AM -0800, Drew Jenkins wrote: > - Original Message > From: Garrett Cooper <[EMAIL PROTECTED]> > To: freebsd-questions@freebsd.org > Sent: Thursday, March 8, 2007 11:09:13 AM > Subject: Re: Setting Env > > > Well, it's going to involve a bit more than that to get an rc script up > > and running I'm afraid.. the script needs a start, stop, status > > functions, as well as a few others. Some examples are in the /etc/rc.d > > and /usr/local/etc/rc.d directories, as you've discovered. > > > > Given your output above, maybe you want to add the LD_LIBRARY_PATH lines > > to the zopectl file? > > Brilliant! Why doesn't *that* work?! This is crazy! I even added your little > script and, after it booted, tried running that directly (after stopping > Zope) and it _still_ didn't work! That makes no sense to me at all! I put > together a little script, as I stated earlier, that set the env, stopped and > started my Zope instances (calling on zopectl), and *that* worked, so why > doesn't this work?? That whole bin dir in Zope is owned by root, so how is > running that script different than, as root, setting the env? Insane! > Drew I think this is really changing to getting a script to run at boot time from its previous 'setting env'. Anyway, I suggest first just working on getting any script to run at boot time - or rather at the time the system comes up for multi- user, but that stuff does not run when it comes up to single-user. So, my next suggestion is to make any little ole script with a couple of echo-s in it to demonstration that it runs and put that it the /usr/local/etc/rc.d directory with the correct permissions and name, etc. NOTE, someone in an earlier post clarified the .sh issue with information that was new to me about the system looking for certain flags inside the file if the file name does not have the .sh ending. Go back and check that out, but the this, assume you have to have .sh and execute permission. You do not have to have a start/stop/restart check in the script if the script will always just run regardless of parameter. But, what the system does is call the script with a parameter of 'start' at boot time and a parameter of 'stop' at shutdown time. But for the sake of the primative test, those can be omitted. Let's say you call the scriptfile: 'rctest.sh' Put something like: #!/bin/sh echo "running rctest.sh, got this far" # Add any any other stuff you want to test echo "running rctest.sh, finished" Now, if the bare skeleton works, then start adding more parts to it until you get to where everything works. Add more echo-s if they are useful. You could also look up how to get your messages written to a log file. jerry > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
- Original Message From: Garrett Cooper <[EMAIL PROTECTED]> To: freebsd-questions@freebsd.org Sent: Thursday, March 8, 2007 11:09:13 AM Subject: Re: Setting Env > Well, it's going to involve a bit more than that to get an rc script up > and running I'm afraid.. the script needs a start, stop, status > functions, as well as a few others. Some examples are in the /etc/rc.d > and /usr/local/etc/rc.d directories, as you've discovered. > > Given your output above, maybe you want to add the LD_LIBRARY_PATH lines > to the zopectl file? Brilliant! Why doesn't *that* work?! This is crazy! I even added your little script and, after it booted, tried running that directly (after stopping Zope) and it _still_ didn't work! That makes no sense to me at all! I put together a little script, as I stated earlier, that set the env, stopped and started my Zope instances (calling on zopectl), and *that* worked, so why doesn't this work?? That whole bin dir in Zope is owned by root, so how is running that script different than, as root, setting the env? Insane! Drew No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
Drew Jenkins wrote: 20I wrote the following script (with your help) to solve the problem I'm having with setting the MySQL environment and getting Zope up after the fact. I have saved this in /usr/local/etc/rc.d/ If I run this after the machine reboots, all is well. If I simply let it run in the reboot sequence, it doesn't do it's job! The sleep command is to give the server a chance to finish all its other bootup sequences, since that appears to be the factor messing things up. But it doesn't work!! What can I do to tweak this to do what I need it to do? TIA, Drew #!/bin/sh sleep 60 if [ -n "$LD_LIBRARY_PATH" ] ; then export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib/mysql" else export LD_LIBRARY_PATH="/usr/local/lib/mysql" fi cd /usr/local/zope/ ./instance1/bin/zopectl stop ./instance1/bin/zopectl start ./instance2/bin/zopectl stop ./instance2/bin/zopectl start Well, it's going to involve a bit more than that to get an rc script up and running I'm afraid.. the script needs a start, stop, status functions, as well as a few others. Some examples are in the /etc/rc.d and /usr/local/etc/rc.d directories, as you've discovered. Given your output above, maybe you want to add the LD_LIBRARY_PATH lines to the zopectl file? Cheers! -Garrett ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
20I wrote the following script (with your help) to solve the problem I'm having with setting the MySQL environment and getting Zope up after the fact. I have saved this in /usr/local/etc/rc.d/ If I run this after the machine reboots, all is well. If I simply let it run in the reboot sequence, it doesn't do it's job! The sleep command is to give the server a chance to finish all its other bootup sequences, since that appears to be the factor messing things up. But it doesn't work!! What can I do to tweak this to do what I need it to do? TIA, Drew #!/bin/sh sleep 60 if [ -n "$LD_LIBRARY_PATH" ] ; then export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib/mysql" else export LD_LIBRARY_PATH="/usr/local/lib/mysql" fi cd /usr/local/zope/ ./instance1/bin/zopectl stop ./instance1/bin/zopectl start ./instance2/bin/zopectl stop ./instance2/bin/zopectl start Food fight? Enjoy some healthy debate in the Yahoo! Answers Food & Drink Q&A. http://answers.yahoo.com/dir/?link=list&sid=396545367 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
Thanks. I'm downloading a big file right now, so can't reboot, but did chown :) Drew - Original Message From: Kevin Kinsey <[EMAIL PROTECTED]> To: Drew Jenkins <[EMAIL PROTECTED]> Sent: Wednesday, March 7, 2007 6:14:50 PM Subject: Re: Setting Env Drew Jenkins wrote: >>> The command should be >>> # ldconfig -m /usr/local/lib/mysql >> Thanks for the correction. This is actually what gets run when mysql is >> installed via ports. > > With that, I went ahead and chowned the dir back to mysql, ran the > command successfully, but it still didn't work. Now I'm wondering > wondering if maybe it's a permissions problem. As I mentioned > earlier, I chowned everything to mysql:mysql because of an > earlier permissions problem. Should I chown that whole dir > ( /usr/local/lib/mysql )? Or something else? > TIA, > Drew > > Upgraded last night: [502] Wed 07.Mar.2007 16:09:00 [EMAIL PROTECTED] ls -l /usr/local/lib | grep mysql drwxr-xr-x 2 root wheel 1024 Mar 6 21:19 mysql/ [503] Wed 07.Mar.2007 16:09:07 [EMAIL PROTECTED] ls -l /usr/local/lib/mysql total 4 -rwxr-xr-x 1 root wheel 840 Mar 6 21:19 ha_example.la* lrwxr-xr-x 1 root wheel 15 Mar 6 21:19 ha_example.so@ -> ha_example.so.0 -rwxr-xr-x 1 root wheel 29443 Mar 6 21:19 ha_example.so.0* -r--r--r-- 1 root wheel1402 Mar 6 21:19 libdbug.a -r--r--r-- 1 root wheel 77136 Mar 6 21:19 libheap.a -r--r--r-- 1 root wheel 373300 Mar 6 21:19 libmyisam.a -r--r--r-- 1 root wheel 60970 Mar 6 21:19 libmyisammrg.a -rw-r--r-- 1 root wheel 513856 Mar 6 20:47 libmysqlclient.a -rwxr-xr-x 1 root wheel 860 Mar 6 20:47 libmysqlclient.la* lrwxr-xr-x 1 root wheel 20 Mar 6 20:47 libmysqlclient.so@ -> libmysqlclient.so.15 -rwxr-xr-x 1 root wheel 443684 Mar 6 20:47 libmysqlclient.so.15* -rw-r--r-- 1 root wheel 523008 Mar 6 20:47 libmysqlclient_r.a -rwxr-xr-x 1 root wheel 892 Mar 6 20:47 libmysqlclient_r.la* lrwxr-xr-x 1 root wheel 22 Mar 6 20:47 libmysqlclient_r.so@ -> libmysqlclient_r.so.15 -rwxr-xr-x 1 root wheel 451915 Mar 6 20:47 libmysqlclient_r.so.15* -r--r--r-- 1 root wheel 302608 Mar 6 21:19 libmystrings.a -r--r--r-- 1 root wheel 272920 Mar 6 21:19 libmysys.a -r--r--r-- 1 root wheel6670 Mar 6 21:19 libvio.a HTH, KDK -- I have a map of the United States. It's actual size. I spent last summer folding it. People ask me where I live, and I say, E6. -- Steven Wright Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
- Original Message From: DAve <[EMAIL PROTECTED]> To: Drew Jenkins <[EMAIL PROTECTED]> Sent: Wednesday, March 7, 2007 4:25:12 PM Subject: Re: Setting Env >/usr/local/lib/mysql should be owned by root:wheel, at least it is all >my servers. I chown'd it back. >Do that and run ldconfig -r | grep mysql > >I get the following, > >bash-2.05b# ldconfig -r | grep mysql > search directories: >/lib:/usr/lib:/usr/lib/compat:/usr/local/lib:/usr/local/lib/mysql:/usr/local/lib/compat/pkg > 82:-lmysqlclient_r.14 => >/usr/local/lib/mysql/libmysqlclient_r.so.14 > 83:-lmysqlclient.14 => /usr/local/lib/mysql/libmysqlclient.so.14 Same here. TIA, Drew Food fight? Enjoy some healthy debate in the Yahoo! Answers Food & Drink Q&A. http://answers.yahoo.com/dir/?link=list&sid=396545367 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
> So pass -i or fix the ownership/permissions. Well, I've tried both now with no luck! Drew Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. http://farechase.yahoo.com/promo-generic-14795097 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
> > The command should be > > # ldconfig -m /usr/local/lib/mysql > > Thanks for the correction. This is actually what gets run when mysql is > installed via ports. With that, I went ahead and chowned the dir back to mysql, ran the command successfully, but it still didn't work. Now I'm wondering if maybe it's a permissions problem. As I mentioned earlier, I chowned everything to mysql:mysql because of an earlier permissions problem. Should I chown that whole dir ( /usr/local/lib/mysql )? Or something else? TIA, Drew Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. http://farechase.yahoo.com/promo-generic-14795097 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
On Wednesday 07 March 2007 13:39, Drew Jenkins wrote: > On 06/03/07, Drew Jenkins <[EMAIL PROTECTED]> wrote: > > > Don Hinton wrote: > > > ># ldconfig -aout -f /etc/ld.so.conf /usr/local/lib/mysql/ > > > > > > > >will create it for you. man ldconfig for more info... > > > > > > Well, that created a binary, but when I rebooted...nothing. Same > > > problem :( > > > > The command should be > > # ldconfig -m /usr/local/lib/mysql > > > > The file is not /etc/ld.so.conf, nor does this file exist on > > the default install of freebsd, but rather /var/run/ld.so.hints. > > # ldconfig -m /usr/local/lib/mysql > ldconfig: /usr/local/lib/mysql: ignoring directory not owned by root > > I had some permissions problems earlier with this installation and ended up > chowning everything to mysql. But I think that dir needs to be owned by > mysql. Comment? Here's what the man page says about it: For security reasons, directories which are world or group-writable or which are not owned by root produce warning messages and are skipped, unless the -i option is present. So pass -i or fix the ownership/permissions. Take a look at man ldconfig for more info... Also, sorry for my initial erroneous post.. hth... don > TIA, > Drew > > > > > ___ >_ Bored stiff? Loosen up... > Download and play hundreds of games for free on Yahoo! Games. > http://games.yahoo.com/games/front > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "[EMAIL PROTECTED]" -- Don Hinton or Institute for Software Integrated Systems (ISIS), Vanderbilt University tel: 615.480.5667 or 615.870.9728 pgpGxjH4dI980.pgp Description: PGP signature
Re: Setting Env
On 06/03/07, Drew Jenkins <[EMAIL PROTECTED]> wrote: > > Don Hinton wrote: > > > > ># ldconfig -aout -f /etc/ld.so.conf /usr/local/lib/mysql/ > > > > > >will create it for you. man ldconfig for more info... > > > > Well, that created a binary, but when I rebooted...nothing. Same problem :( > > The command should be > # ldconfig -m /usr/local/lib/mysql > > The file is not /etc/ld.so.conf, nor does this file exist on > the default install of freebsd, but rather /var/run/ld.so.hints. # ldconfig -m /usr/local/lib/mysql ldconfig: /usr/local/lib/mysql: ignoring directory not owned by root I had some permissions problems earlier with this installation and ended up chowning everything to mysql. But I think that dir needs to be owned by mysql. Comment? TIA, Drew Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games. http://games.yahoo.com/games/front ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
On Wednesday 07 March 2007 13:27, [EMAIL PROTECTED] wrote: > On 06/03/07, Drew Jenkins <[EMAIL PROTECTED]> wrote: > > Don Hinton wrote: > > ># ldconfig -aout -f /etc/ld.so.conf /usr/local/lib/mysql/ > > > > > >will create it for you. man ldconfig for more info... > > > > Well, that created a binary, but when I rebooted...nothing. Same problem > > :( > > The command should be > # ldconfig -m /usr/local/lib/mysql Thanks for the correction. This is actually what gets run when mysql is installed via ports. > > The file is not /etc/ld.so.conf, nor does this file exist on > the default install of freebsd, but rather /var/run/ld.so.hints. > > Also, the -aout flag would likely confuse things even further, unless > we were running a very old version of freebsd. -- Don Hinton or Institute for Software Integrated Systems (ISIS), Vanderbilt University tel: 615.480.5667 or 615.870.9728 pgpd7i9DTMJEL.pgp Description: PGP signature
Re: Setting Env
On 06/03/07, Drew Jenkins <[EMAIL PROTECTED]> wrote: Don Hinton wrote: ># ldconfig -aout -f /etc/ld.so.conf /usr/local/lib/mysql/ > >will create it for you. man ldconfig for more info... Well, that created a binary, but when I rebooted...nothing. Same problem :( The command should be # ldconfig -m /usr/local/lib/mysql The file is not /etc/ld.so.conf, nor does this file exist on the default install of freebsd, but rather /var/run/ld.so.hints. Also, the -aout flag would likely confuse things even further, unless we were running a very old version of freebsd. -- -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
I just tried another thing: 1) Reboot server 2) Run the mysql-server script that has the aforementioned mini-script in it (that produced the echo) 3) Restart Zope. Nope...didn't work. Then I ran: setenv LD_LIBRARY_PATH /usr/local/lib/mysql and restarted Zope and no problem! Go figure! Drew Don't get soaked. Take a quick peek at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
20BTW, here is how I test to see if it works after reboot. 1) Try to pull up a page served by Zope. Get an error. 2) Shut Zope down. 3) Restart Zope with runzope to read the error. It is concerning the MySQL environment. 4) Enter the command: setenv LD_LIBRARY_PATH /usr/local/lib/mysql 5) Restart Zope. Everything fine. Drew Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. http://farechase.yahoo.com/promo-generic-14795097 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
- Original Message From: Jerry McAllister <[EMAIL PROTECTED]> > > >#!/bin/sh > > > > > >if [ -n "$LD_LIBRARY_PATH" ] ; then > > >export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib/mysql" > > >else > > >export LD_LIBRARY_PATH="/usr/local/lib/mysql" > > >fi > > > > I put that in the /usr/local/etc/rc.d/mysql-server script > > (which is #!/bin/sh) but it didn't work :( > > Does the script even run? Yes. It was only when I put this script in that mysql came up on boot. > Try putting some echo-s in their and see if anything happens. I did that. I found out BTW that it executes the "if" part of the above, not the "else" part. > What are the permissions and ownership of the /usr/local/etc/rc.d/mysql-server > script file? # ls -al /usr/local/etc/rc.d/mysql-server -r-xr-xr-x 1 root wheel 1824 Mar 7 11:29 /usr/local/etc/rc.d/mysql-server TIA, Drew TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. http://tv.yahoo.com/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
On Wed, Mar 07, 2007 at 09:43:24AM -0800, Drew Jenkins wrote: > Garret Cooper wrote: > > >Also, something to the effect like the following is better for > >portability reasons: > > > >#!/bin/sh > > > >if [ -n "$LD_LIBRARY_PATH" ] ; then > >export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib/mysql" > >else > >export LD_LIBRARY_PATH="/usr/local/lib/mysql" > >fi > > I put that in the /usr/local/etc/rc.d/mysql-server script > (which is #!/bin/sh) but it didn't work :( Does the script even run? Try putting some echo-s in their and see if anything happens. What are the permissions and ownership of the /usr/local/etc/rc.d/mysql-server script file? jerry > > Jerry McAllister wrote: > > >What does your rc.conf look like? > > # -- sysinstall generated deltas -- # Sat Feb 24 04:38:22 2007 > # Created: Sat Feb 24 04:38:22 2007 > # Enable network daemons for user convenience. > # Please make all changes to this file, not to /etc/defaults/rc.conf. > # This file now contains just the overrides from /etc/defaults/rc.conf. > defaultrouter="203.223.150.1" > hostname="server312.web.vi" > ifconfig_fxp0="inet 203.223.150.58 netmask 255.255.255.192" > linux_enable="YES" > sshd_enable="YES" > usbd_enable="YES" > pound_enable="YES" > sendmail_enable="NO" > sendmail_submit_enable="NO" > sendmail_outbound_enable="NO" > sendmail_msp_queue_enable="NO" > slapd_enable="YES" > slapd_flags='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0/";' > slapd_sockets="/var/run/openldap/ldapi" > mysql_enable="YES" > LD_LIBRARY_PATH=/usr/local/lib/mysql/ > > That last line, of course, is useless. > > >Boot up with it and then take a look at the values. > > What values and how do I look for them? > > >make a startup script for whatever it is - probably the install > >already put one in /usr/local/etc/rc.d/ > >and in that startup script, source the /etc/rc.conf file. > > I did. Then I used Garrett's (see above). No luck. > TIA, > Drew > > > > > > > Food fight? Enjoy some healthy debate > in the Yahoo! Answers Food & Drink Q&A. > http://answers.yahoo.com/dir/?link=list&sid=396545367 > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
Garret Cooper wrote: >Also, something to the effect like the following is better for >portability reasons: > >#!/bin/sh > >if [ -n "$LD_LIBRARY_PATH" ] ; then >export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib/mysql" >else >export LD_LIBRARY_PATH="/usr/local/lib/mysql" >fi I put that in the /usr/local/etc/rc.d/mysql-server script (which is #!/bin/sh) but it didn't work :( Jerry McAllister wrote: >What does your rc.conf look like? # -- sysinstall generated deltas -- # Sat Feb 24 04:38:22 2007 # Created: Sat Feb 24 04:38:22 2007 # Enable network daemons for user convenience. # Please make all changes to this file, not to /etc/defaults/rc.conf. # This file now contains just the overrides from /etc/defaults/rc.conf. defaultrouter="203.223.150.1" hostname="server312.web.vi" ifconfig_fxp0="inet 203.223.150.58 netmask 255.255.255.192" linux_enable="YES" sshd_enable="YES" usbd_enable="YES" pound_enable="YES" sendmail_enable="NO" sendmail_submit_enable="NO" sendmail_outbound_enable="NO" sendmail_msp_queue_enable="NO" slapd_enable="YES" slapd_flags='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0/";' slapd_sockets="/var/run/openldap/ldapi" mysql_enable="YES" LD_LIBRARY_PATH=/usr/local/lib/mysql/ That last line, of course, is useless. >Boot up with it and then take a look at the values. What values and how do I look for them? >make a startup script for whatever it is - probably the install >already put one in /usr/local/etc/rc.d/ >and in that startup script, source the /etc/rc.conf file. I did. Then I used Garrett's (see above). No luck. TIA, Drew Food fight? Enjoy some healthy debate in the Yahoo! Answers Food & Drink Q&A. http://answers.yahoo.com/dir/?link=list&sid=396545367 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
On Wed, Mar 07, 2007 at 08:24:05AM -0800, Drew Jenkins wrote: > Jerry McAllister wrote: > > >Ok. Simplest way to solve this is to make your own run script and invoke > >it at boot. It's not that bad to do from what I understand.. > > Will this do? > > #!/bin/csh > setenv LD_LIBRARY_PATH /usr/local/lib/mysql/ > > Because I've already tried it (in /usr/local/etc/rc.d with chown +x). It > didn't work. Other ideas? > Drew Check out what Garret Cooper just posted. It is a cleaner solution. jerry > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
On Wed, Mar 07, 2007 at 08:08:35AM -0800, Drew Jenkins wrote: > >> - Original Message > >> From: Jerry McAllister <[EMAIL PROTECTED]> > >> To: Drew Jenkins <[EMAIL PROTECTED]> > >> 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/" > >> > > > >Well, setenv is a csh or tcsh command and isn't in sh and probably > >not in bash either (I haven't used bash). > > > > I am aware of that. I was trying to explain how I used > every_possible_combination of things I could think of! > > >The export command is an sh and probably bash command and it > >doesn't exist in csh or tcsh. > > > > Yes, yes. I know. > > > > >> > >> 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? > > > >Look at other variable setting in rc.conf. That should give you > >a good clue. For example, in my rc.conf I have several. One is: > > moused_enable="YES" > >That makes the moused_enable variable have a value of YES. > >So, if you want LD_LIBRARY_PATH to have the value of /usr/local/lib/mysql/ > >might that not be: > > LD_LIBRARY_PATH="/usr/local/lib/mysql/" > > > > I tried that and posted yesterday that that failed. Did you source the rc.conf files? I am used to using csh/tcsh which uses the source command. I am not sure I remember it for sh, but it might be just '.' followed by the file name. Sourcing the file sucks it in and makes all the variable settings available to the current shell.You need to do some handbook and shell documentation reading and example studying. There are lots of things on the system that do this and that make good examples to emulate.I am not a shell programmer per se, but I manage to get by through grabbing chunks of things that already work on the system ad modifying they for my current use. I think many people learn that way. > > >If you put it in the script that starts things - there needs to be one - > >then it depends on the script language, csh/tcsh sh/bash. > >csh/tcsh use setenv and set > >sh [and bash] use set and variable_name=value and needs an export to > >make it available to other entities besides the shell itself. > >You should look up the man pages on these things and take a look > >at some other scripts such as those in /usr/local/etc/rc.d for > >examples. > > What *things*? As far as scripts, this *should* be easy... Things like setenv, set, source and such. rc.d startup scripts, rc.conf. What does your rc.conf look like? Boot up with it and then take a look at the values. make a startup script for whatever it is - probably the install already put one in /usr/local/etc/rc.d/ and in that startup script, source the /etc/rc.conf file. > > #!/bin/csh > setenv LD_LIBRARY_PATH /usr/local/lib/mysql/ > > ...right? It doesn't work. Any other ideas? > Drew > > > > > > Never miss an email again! > Yahoo! Toolbar alerts you the instant new Mail arrives. > http://tools.search.yahoo.com/toolbar/features/mail/ > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
Jerry McAllister wrote: >Ok. Simplest way to solve this is to make your own run script and invoke >it at boot. It's not that bad to do from what I understand.. Will this do? #!/bin/csh setenv LD_LIBRARY_PATH /usr/local/lib/mysql/ Because I've already tried it (in /usr/local/etc/rc.d with chown +x). It didn't work. Other ideas? Drew Get your own web address. Have a HUGE year through Yahoo! Small Business. http://smallbusiness.yahoo.com/domains/?p=BESTDEAL ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
Drew Jenkins wrote: - Original Message From: Jerry McAllister <[EMAIL PROTECTED]> To: Drew Jenkins <[EMAIL PROTECTED]> 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/" Well, setenv is a csh or tcsh command and isn't in sh and probably not in bash either (I haven't used bash). I am aware of that. I was trying to explain how I used every_possible_combination of things I could think of! The export command is an sh and probably bash command and it doesn't exist in csh or tcsh. Yes, yes. I know. 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? Look at other variable setting in rc.conf. That should give you a good clue. For example, in my rc.conf I have several. One is: moused_enable="YES" That makes the moused_enable variable have a value of YES. So, if you want LD_LIBRARY_PATH to have the value of /usr/local/lib/mysql/ might that not be: LD_LIBRARY_PATH="/usr/local/lib/mysql/" I tried that and posted yesterday that that failed. If you put it in the script that starts things - there needs to be one - then it depends on the script language, csh/tcsh sh/bash. csh/tcsh use setenv and set sh [and bash] use set and variable_name=value and needs an export to make it available to other entities besides the shell itself. You should look up the man pages on these things and take a look at some other scripts such as those in /usr/local/etc/rc.d for examples. What *things*? As far as scripts, this *should* be easy... #!/bin/csh setenv LD_LIBRARY_PATH /usr/local/lib/mysql/ ...right? It doesn't work. Any other ideas? Drew It probably gets overwritten somewhere later on down the line. Also, something to the effect like the following is better for portability reasons: #!/bin/sh if [ -n "$LD_LIBRARY_PATH" ] ; then export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib/mysql" else export LD_LIBRARY_PATH="/usr/local/lib/mysql" fi # run mysql junk here.. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
Jerry McAllister wrote: On Tue, Mar 06, 2007 at 04:28:39PM -0800, Drew Jenkins wrote: - Original Message From: Jerry McAllister <[EMAIL PROTECTED]> To: Drew Jenkins <[EMAIL PROTECTED]> 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/" Well, setenv is a csh or tcsh command and isn't in sh and probably not in bash either (I haven't used bash). The export command is an sh and probably bash command and it doesn't exist in csh or tcsh. 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? Look at other variable setting in rc.conf. That should give you a good clue. For example, in my rc.conf I have several. One is: moused_enable="YES" That makes the moused_enable variable have a value of YES. So, if you want LD_LIBRARY_PATH to have the value of /usr/local/lib/mysql/ might that not be: LD_LIBRARY_PATH="/usr/local/lib/mysql/" If you put it in the script that starts things - there needs to be one - then it depends on the script language, csh/tcsh sh/bash. csh/tcsh use setenv and set sh [and bash] use set and variable_name=value and needs an export to make it available to other entities besides the shell itself. You should look up the man pages on these things and take a look at some other scripts such as those in /usr/local/etc/rc.d for examples. jerry TIA, Drew Ok. Simplest way to solve this is to make your own run script and invoke it at boot. It's not that bad to do from what I understand.. -Garrett ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
>> - Original Message >> From: Jerry McAllister <[EMAIL PROTECTED]> >> To: Drew Jenkins <[EMAIL PROTECTED]> >> 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/" >> > >Well, setenv is a csh or tcsh command and isn't in sh and probably >not in bash either (I haven't used bash). > I am aware of that. I was trying to explain how I used every_possible_combination of things I could think of! >The export command is an sh and probably bash command and it >doesn't exist in csh or tcsh. > Yes, yes. I know. > >> >> 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? > >Look at other variable setting in rc.conf. That should give you >a good clue. For example, in my rc.conf I have several. One is: > moused_enable="YES" >That makes the moused_enable variable have a value of YES. >So, if you want LD_LIBRARY_PATH to have the value of /usr/local/lib/mysql/ >might that not be: > LD_LIBRARY_PATH="/usr/local/lib/mysql/" > I tried that and posted yesterday that that failed. >If you put it in the script that starts things - there needs to be one - >then it depends on the script language, csh/tcsh sh/bash. >csh/tcsh use setenv and set >sh [and bash] use set and variable_name=value and needs an export to >make it available to other entities besides the shell itself. >You should look up the man pages on these things and take a look >at some other scripts such as those in /usr/local/etc/rc.d for >examples. What *things*? As far as scripts, this *should* be easy... #!/bin/csh setenv LD_LIBRARY_PATH /usr/local/lib/mysql/ ...right? It doesn't work. Any other ideas? Drew Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. http://tools.search.yahoo.com/toolbar/features/mail/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
On Tue, Mar 06, 2007 at 04:28:39PM -0800, Drew Jenkins wrote: > - Original Message > From: Jerry McAllister <[EMAIL PROTECTED]> > To: Drew Jenkins <[EMAIL PROTECTED]> > 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/" > Well, setenv is a csh or tcsh command and isn't in sh and probably not in bash either (I haven't used bash). The export command is an sh and probably bash command and it doesn't exist in csh or tcsh. > > 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? Look at other variable setting in rc.conf. That should give you a good clue. For example, in my rc.conf I have several. One is: moused_enable="YES" That makes the moused_enable variable have a value of YES. So, if you want LD_LIBRARY_PATH to have the value of /usr/local/lib/mysql/ might that not be: LD_LIBRARY_PATH="/usr/local/lib/mysql/" If you put it in the script that starts things - there needs to be one - then it depends on the script language, csh/tcsh sh/bash. csh/tcsh use setenv and set sh [and bash] use set and variable_name=value and needs an export to make it available to other entities besides the shell itself. You should look up the man pages on these things and take a look at some other scripts such as those in /usr/local/etc/rc.d for examples. jerry > TIA, > Drew > > > > > > > > > Get your own web address. > Have a HUGE year through Yahoo! Small Business. > http://smallbusiness.yahoo.com/domains/?p=BESTDEAL > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
- Original Message From: Kirk Strauser <[EMAIL PROTECTED]> To: freebsd-questions@freebsd.org Sent: Wednesday, March 7, 2007 11:14:51 AM Subject: Re: Setting Env >On Tuesday 06 March 2007, 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: > >What makes you think that? How did you install MySQL and Zope? MySQL from the port and Zope (since it's an older version) from source. Food fight? Enjoy some healthy debate in the Yahoo! Answers Food & Drink Q&A. http://answers.yahoo.com/dir/?link=list&sid=396545367 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
On Tuesday 06 March 2007, 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: What makes you think that? How did you install MySQL and Zope? -- Kirk Strauser pgp0lflqMejX7.pgp Description: PGP signature
Re: Setting Env
20- Original Message From: Garrett Cooper <[EMAIL PROTECTED]> To: freebsd-questions@freebsd.org Sent: Wednesday, March 7, 2007 4:55:19 AM Subject: Re: Setting Env >Drew Jenkins wrote: >> - Original Message >> From: Garrett Cooper ><[EMAIL PROTECTED]> >> To: freebsd-questions@freebsd.org >> Sent: Wednesday, March 7, 2007 1:02:01 AM >> Subject: Re: Setting Env >> >> Drew Jenkins wrote: >> >>> 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. >> >> Sounds great. Again, as I wrote in my last post, I don't know *exactly* what >> command needs to be entered!! I have tried this in the /etc/rc.conf file: >> >> setenv LD_LIBRARY_PATH /usr/local/lib/mysql/ >> --or-- >> export LD_LIBRARY_PATH="/usr/local/lib/mysql/" >> --or-- >> LD_LIBRARY_PATH=/usr/local/lib/mysql/ >> >> none of which work. I have tried creating a script and chmod +x in the >> /usr/local/etc/rc.d folder: >> >> #!/bin/csh >> setenv LD_LIBRARY_PATH /usr/local/lib/mysql/ >> >> and that doesn't work, either. Would it be okay if I asked anyone out there >> to tell me *exactly* what I need to do to get this to be set on startup?? >> TIA. >> Drew > >>The question is, what's failing (or not behaving as >>expected)? I would like that line to execute upon startup. Right now, every time I boot the machine, I have to remember to enter that setenv command, and that's a nuisance. I would like it to be automatic. TIA, Drew Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. http://answers.yahoo.com/dir/?link=list&sid=396546091 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
Drew Jenkins wrote: - Original Message From: Garrett Cooper <[EMAIL PROTECTED]> To: freebsd-questions@freebsd.org Sent: Wednesday, March 7, 2007 1:02:01 AM Subject: Re: Setting Env Drew Jenkins wrote: 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. Sounds great. Again, as I wrote in my last post, I don't know *exactly* what command needs to be entered!! I have tried this in the /etc/rc.conf file: setenv LD_LIBRARY_PATH /usr/local/lib/mysql/ --or-- export LD_LIBRARY_PATH="/usr/local/lib/mysql/" --or-- LD_LIBRARY_PATH=/usr/local/lib/mysql/ none of which work. I have tried creating a script and chmod +x in the /usr/local/etc/rc.d folder: #!/bin/csh setenv LD_LIBRARY_PATH /usr/local/lib/mysql/ and that doesn't work, either. Would it be okay if I asked anyone out there to tell me *exactly* what I need to do to get this to be set on startup?? TIA. Drew The question is, what's failing (or not behaving as expected)? -Garrett ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
- Original Message From: Garrett Cooper <[EMAIL PROTECTED]> To: freebsd-questions@freebsd.org Sent: Wednesday, March 7, 2007 1:02:01 AM Subject: Re: Setting Env Drew Jenkins wrote: >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. Sounds great. Again, as I wrote in my last post, I don't know *exactly* what command needs to be entered!! I have tried this in the /etc/rc.conf file: setenv LD_LIBRARY_PATH /usr/local/lib/mysql/ --or-- export LD_LIBRARY_PATH="/usr/local/lib/mysql/" --or-- LD_LIBRARY_PATH=/usr/local/lib/mysql/ none of which work. I have tried creating a script and chmod +x in the /usr/local/etc/rc.d folder: #!/bin/csh setenv LD_LIBRARY_PATH /usr/local/lib/mysql/ and that doesn't work, either. Would it be okay if I asked anyone out there to tell me *exactly* what I need to do to get this to be set on startup?? TIA. Drew Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
Drew Jenkins wrote: - Original Message From: Jerry McAllister <[EMAIL PROTECTED]> To: Drew Jenkins <[EMAIL PROTECTED]> 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 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
- Original Message From: Jerry McAllister <[EMAIL PROTECTED]> To: Drew Jenkins <[EMAIL PROTECTED]> 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 Get your own web address. Have a HUGE year through Yahoo! Small Business. http://smallbusiness.yahoo.com/domains/?p=BESTDEAL ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
On Tue, Mar 06, 2007 at 03:37:23PM -0800, Drew Jenkins wrote: > Don Hinton wrote: > > ># ldconfig -aout -f /etc/ld.so.conf /usr/local/lib/mysql/ > > > >will create it for you. man ldconfig for more info... > > Well, that created a binary, but when I rebooted...nothing. Same problem :( > > - Original Message > From: Jerry McAllister <[EMAIL PROTECTED]> > To: Drew Jenkins <[EMAIL PROTECTED]> > Cc: freebsd-questions@freebsd.org > Sent: Tuesday, March 6, 2007 6:31:34 PM > Subject: Re: Setting Env > > >I don't know for sure what you mean That's not an option. Is this > >running from cron or at system bootup or something so there is no login > >involved? > > Correct > > >In those cases, it is well documented that your scripts have to be > >completely responsible for their environments and paths, etc. So, > >set everything within the scipt. Or, if it is something systemwide, > >then put setting the variable it in /etc/rc.conf or /etc/rc.conf.local if > >you let your system have one. > > Exactly. But how? I could write a script like I did before: Well, either put setting the environment variable in rc.conf - then it will be readable by everyone or put it is the script that needs the variable to be set. > > #!/bin/csh > setenv LD_LIBRARY_PATH /usr/local/lib/mysql/ > > (chmod +x) but that didn't execute, dunno why. But then how do I call > that script? What shell does /etc/rc.conf use? What failed in the script? are those two lines the only ones that were in the script? If so, the script does nothing. It sets the variable only for things from within the script. The script is a shell. I suppose you could source it, but that stil takes a command. 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. jerry > TIA, > Drew > > > > > > > > > We won't tell. Get more on shows you hate to love > (and love to hate): Yahoo! TV's Guilty Pleasures list. > http://tv.yahoo.com/collections/265 > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
Don Hinton wrote: ># ldconfig -aout -f /etc/ld.so.conf /usr/local/lib/mysql/ > >will create it for you. man ldconfig for more info... Well, that created a binary, but when I rebooted...nothing. Same problem :( - Original Message From: Jerry McAllister <[EMAIL PROTECTED]> To: Drew Jenkins <[EMAIL PROTECTED]> Cc: freebsd-questions@freebsd.org Sent: Tuesday, March 6, 2007 6:31:34 PM Subject: Re: Setting Env >I don't know for sure what you mean That's not an option. Is this >running from cron or at system bootup or something so there is no login >involved? Correct >In those cases, it is well documented that your scripts have to be >completely responsible for their environments and paths, etc. So, >set everything within the scipt. Or, if it is something systemwide, >then put setting the variable it in /etc/rc.conf or /etc/rc.conf.local if >you let your system have one. Exactly. But how? I could write a script like I did before: #!/bin/csh setenv LD_LIBRARY_PATH /usr/local/lib/mysql/ (chmod +x) but that didn't execute, dunno why. But then how do I call that script? What shell does /etc/rc.conf use? TIA, Drew We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. http://tv.yahoo.com/collections/265 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
Hi Drew: On Tuesday 06 March 2007 15:11, Drew Jenkins wrote: > Bill Campbell wrote: > > << that I should edit said line into /etc/ld.so.conf >> > > Unfortunately there is no such file on my system. # ldconfig -aout -f /etc/ld.so.conf /usr/local/lib/mysql/ will create it for you. man ldconfig for more info... hth... don > > - Original Message > From: Jerry McAllister <[EMAIL PROTECTED]> > To: Drew Jenkins <[EMAIL PROTECTED]> > Cc: freebsd-questions@freebsd.org > Sent: Tuesday, March 6, 2007 3:33:01 PM > Subject: Re: Setting Env > > >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. > > I tried adding its bash variant to /usr/local/etc/rc.d/mysql-server but > that didn't work. As far as adding it to my shell, that won't run the > script when the server reboots, only when I log in, right? That's not an > option. > > Any other ideas? > TIA, > Drew > 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 > > "[EMAIL PROTECTED]" > > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "[EMAIL PROTECTED]" > > > > > > > > > ___ >_ Don't get soaked. Take a quick peek at the forecast > with the Yahoo! Search weather shortcut. > http://tools.search.yahoo.com/shortcuts/#loc_weather > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "[EMAIL PROTECTED]" -- Don Hinton or Institute for Software Integrated Systems (ISIS), Vanderbilt University tel: 615.480.5667 or 615.870.9728 pgpGMBsLbjnlO.pgp Description: PGP signature
Re: Setting Env
On Tue, Mar 06, 2007 at 01:11:37PM -0800, Drew Jenkins wrote: > Bill Campbell wrote: > > << that I should edit said line into /etc/ld.so.conf >> > > Unfortunately there is no such file on my system. > > - Original Message > From: Jerry McAllister <[EMAIL PROTECTED]> > To: Drew Jenkins <[EMAIL PROTECTED]> > Cc: freebsd-questions@freebsd.org > Sent: Tuesday, March 6, 2007 3:33:01 PM > Subject: Re: Setting Env > > >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. > > I tried adding its bash variant to /usr/local/etc/rc.d/mysql-server but > that didn't work. As far as adding it to my shell, that won't run the > script when the server reboots, only when I log in, right? That's not > an option. I don't know for sure what you mean That's not an option. Is this running from cron or at system bootup or something so there is no login involved? In those cases, it is well documented that your scripts have to be completely responsible for their environments and paths, etc. So, set everything within the scipt. Or, if it is something systemwide, then put setting the variable it in /etc/rc.conf or /etc/rc.conf.local if you let your system have one. jerry > > Any other ideas? > TIA, > Drew > 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 "[EMAIL PROTECTED]" > > > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > > > > > > > > > > Don't get soaked. Take a quick peek at the forecast > with the Yahoo! Search weather shortcut. > http://tools.search.yahoo.com/shortcuts/#loc_weather > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
Bill Campbell wrote: << that I should edit said line into /etc/ld.so.conf >> Unfortunately there is no such file on my system. - Original Message From: Jerry McAllister <[EMAIL PROTECTED]> To: Drew Jenkins <[EMAIL PROTECTED]> Cc: freebsd-questions@freebsd.org Sent: Tuesday, March 6, 2007 3:33:01 PM Subject: Re: Setting Env >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. I tried adding its bash variant to /usr/local/etc/rc.d/mysql-server but that didn't work. As far as adding it to my shell, that won't run the script when the server reboots, only when I log in, right? That's not an option. Any other ideas? TIA, Drew 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 "[EMAIL PROTECTED]" > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" Don't get soaked. Take a quick peek at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
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 "[EMAIL PROTECTED]" > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Env
On Tue, Mar 06, 2007, Drew Jenkins wrote: >20Hi; >For some reason, I need to run this: > >setenv LD_LIBRARY_PATH /usr/local/lib/mysql/ You can probably get around this by adding /usr/local/lib/mysql to the end of /etc/ld.so.conf then running ldconfig. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 Instead of giving money to found colleges to promote learning, why don't they pass a constitutional amendment prohibiting anybody from learning anything? If it works as good as the Prohibition one did, why, in five years we would have the smartest race of people on earth. -- The Best of Will Rogers ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Setting Env
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? 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 "[EMAIL PROTECTED]"