View previous topic :: View next topic |
Author |
Message |
Calvinthesneak
Joined: 15 Nov 2010 Posts: 14
|
Posted: Wed Jan 19, 2011 8:08 Post subject: Unset? |
|
|
I'm curious what is the purpose of the unset command that I see in a lot of the nwnstartup.sh files?
|
|
Back to top |
|
|
Paul R
Joined: 17 Apr 2009 Posts: 42
|
Posted: Wed Jan 19, 2011 14:59 Post subject: |
|
|
Removes the environment variable from the shell environment ... that sounds a bit weird.
Say if you have an environment variable:
you can either set it to nothing
but it will still appear in a list of environment variables like when using 'env' but without a value assigned or you can remove it altogether:
and it doesn't appear in the list. Never tried to see if it makes any difference to the dynamic loader if LD_PRELOAD is set to nothing, pretty sure it doesn't.
You use it to remove the nwnx2.so hook functions from attempting to be used on a non-nwnserver binary. You can also do the same by setting the LD_PRELOAD for that specific command only by prefixing the command with the variable such as:
Code: | LD_PRELOAD=/path/to/nwnx/nwnx2.so /path/to/nwn/nwserver |
that way you can do all sorts of other things without any problems, either or method works fine as long as you know what it is doing. _________________ oops |
|
Back to top |
|
|
Calvinthesneak
Joined: 15 Nov 2010 Posts: 14
|
Posted: Wed Jan 19, 2011 17:35 Post subject: |
|
|
Thanks Paul. I'm getting decent with Linux, but still a few little things that escape me from time to time. I'd read the man page to know what it did, but that doesn't always explain the why very well. |
|
Back to top |
|
|
|