[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Environment Script System



Good points. However, why can't pam-env do the reading?

I understand that Debian packages should not require environmental
variables. That makes perfect sense. And I don't disagree with that. I
speak however about non-Debian programs. I can't think of any better
examples than the JAVA_HOME situation but I still insist such an idea
would be beneficial to more than that. To write and compile Java
programs, JAVA_HOME needs to be set. But JAVA_HOME is naturally
dependent on which JVM you are using, which is available as a Debian
package.

Jerry Haltom

On Tue, 2003-08-12 at 03:39, Colin Watson wrote:
> On Mon, Aug 11, 2003 at 11:32:16PM -0500, Jerry Haltom wrote:
> > I was curious if anybody has brought up the question of an environmental
> > script system in Debian yet? Such a system would make adding
> > environmental variables to a user's login sequence with a Debian package
> > much easier. A few other distros do this same thing. I am not trying to
> > copy features from distros, but presenting the idea on it's own merits.
> > 
> > Such a system would or could consist of a directory /etc/env.d or
> > otherwise named that would contain scripts to be executed in order by a
> > user's default login profile. The update-alternatives system could be
> > used to substitute scripts for specific packages.
> 
> Debian packages must not depend on environment variables to function
> properly. We've been saying that in policy for years, with a rationale.
> As a result, complex systems of setting environment variables should not
> be necessary.
> 
> > A perfect example of the usability of this idea can be seen with setting
> > up a Java environment on Debian. Debian Java policy already contains a
> > number of ways for using alternatives to set the different available
> > executables from different competiting JVMs, and this would allow
> > alternatives to be used to manage the required Java environmental
> > variables.
> 
> If Java requires magic environment variables, it should be fixed, by
> writing wrapper scripts if necessary.
> 
> > I'd like to know if anybody else has any opinions on this? Such a system
> > would be extremely easy to implement. It could be done simply by editing
> > /etc/environment to loop through each file, and including
> > /etc/environment by default in bash_profile or other shell login
> > scripts. A max of 5 lines.
> 
> Not everyone uses bash. For that matter, not everyone even uses a
> Bourne-style shell as their login shell. Also, /etc/environment is not
> available for such use; it's read by the pam_env module, which is not
> prepared for it to contain anything more than simple KEY=VALUE lines.
> 
> Cheers,
> 
> -- 
> Colin Watson                                  [cjwatson@flatline.org.uk]
> 



Reply to: