Re: PW#5-10: System-wide environment variables used for program configuration
"Christian" == Christian Schwarz <schwarz@monet.m.isar.de> writes:
> [This mail is part of Debian Policy Weekly issue #5]
>
> Topic 10: System-wide environment variables used for program
> configuration
I agree with this Topic, but I just want to play devil's advocate a
bit.
> No program may depend on environment variables to get
> reasonable defaults. (That's because these environment variables
> would have to be set in a system-wide configuration file like
> /etc/profile, which is not supported by all shells.)
> If a program should depend on environment variables for its
> configuration, the program has to be changed to fall back to a
> reasonable default configuration if these environment variables are
> not present.
My counter example here would be Oracle. That relies on environment
variables even to operate at all (ORACLE_SID, ORACLE_HOME etc). I
suppose what we'd have to do for misbehaving software like this is
have a wrapper program around the oracle executables?
> Furthermore, as /etc/profile is a configuration file of the
> bash package, no other package may include any environment variables
> or other commands in that file.
Rather than "may include" you should say "no other package may alter",
for clarity.
FYI, and I don't think this changes anything, just FYI, the place to
put system wide environment variables on debian should be
/etc/environment, which is sourced by /etc/profile (or whatever is
appropriate for a given shell). It is not owned by any packages, and
should be considered to be owned by the sysadmin. Nor should any
package touch this one.
.....A. P. Harris...apharris@onShore.com...<URL:http://www.onShore.com/>
Reply to: