Perhaps I missed some threads that could help. If so just point my nose in that direction.

Thanks much.
psu25682@odin.cc.pdx.edu (Karl M. Hegbloom):
> What if we had an /etc/profile.d (not invented here) where packages
> (like postgresql) could drop a startup file for /etc/profile to source
> in a for f in /etc/profile.d/* loop?
>
> Pros and cons?
- It's shell specific. Similar stuff would be needed for other shells.
- If the package needs it, it's buggy and should be fixed. (The correct
way in that case is to make it a script wrapper aound the actual
program, not assume things are done in /etc/profile.)
- If the package doesn't need it, it's unnecessary clutter that will
fill up my root partition and slow up my logins needlessly. As sysadmin,
I don't want to have to clean up stuff like that after every upgrade.
- If it is meant just as an example, put it in /usr/doc/*/examples.
In summary, I still (as on some earlier occasions when this has been
suggested) that the idea is not worth it.
I suppose the latter means executables must be placed in expected path locations and appropriate sym links must be included in the package
what are you trying to do?
A program must not 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 usually depends on environment variables for its
configuration, the program should be changed to fall back to a
reasonable default configuration if these environment variables are
not present. If this cannot be done easily (e.g., if the source code
of a non-free program is not available), the program must be replaced
by a small "wrapper" shell script which sets the environment variables
if they are not already defined, and calls the original program.
Here is an example of a wrapper script for this purpose:
#!/bin/sh
BAR=${BAR:-/var/lib/fubar}
export BAR
exec /usr/lib/foo/foo "$@"
Furthermore, as `/etc/profile' is a configuration file of the
`base-files' package, other packages must not put any environment
variables or other commands into that file.
what exactly is /etc/profile.d supposed to do?
Users browsing this forum: No registered users and 10 guests