Re: how to set a system/user-wide env var?

"William L. Thomson Jr." <[email protected]>
Newsgroups gmane.linux.gentoo.java
Organization Gentoo
Message-ID <[email protected]>
On Wed, 2007-08-29 at 15:23 -0700, Corey wrote:
> Say a java package needs to set a system-wide environment variable 
> (e.g. $FOO_HOME ) - how to I get the ebuild to do do so?

Is this a user space app, like run per use? Or something that would be
started via a init script? Do you just need to set it for compile?

If via an init script any global env variables for the application
should be set in either the init script. Or if adjustable via a file
in /etc/conf.d/

If via a user space application like Netbeans, Limewire, Azereus, etc.
then you usually want to set the global env variables in the startup
script for the app. If it does not have one, make a wrapper which you
should likely do anyway.

If needed during compile using setting the variable in src_unpack or
src_compile should be suffice. If it's static, you might go so far as
putting it globally in the ebuild. But that should be avoided in most
all cases.

If none of those scenario, please provide more details as to what you
are doing, what app, etc. Then we can advise from there :)

-- 
William L. Thomson Jr.
Gentoo/Java
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQBG1fS9PrChP8zZLyYRAj2FAKDq7/ZMEBdGgQyTgSKSwZGVi+SVawCeJdrQ
LPAndgOyRXtpV3GoSxLH5tc=
=mk6Q
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.