What about adding an /etc/profile.d feature? Right now, there is not a simple means for an extension to insert a script into the login process. In a typical linux distribution, I like to put
export JAVA_HOME=/usr/local/java
into a script placed in /etc/profile.d. This is cleaner than modifying /etc/profile (which one should avoid). It is simple to modify /etc/profile to add this feature:
for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
. $i
fi
done
but I imagine others would find it useful so I am suggesting it as a feature for the base. FWIW, it is mentioned in the
LSB.