Yeah, what he said.
The idea is that everything inside /etc/profile.d gets run (probably by
/etc/profile) when you log in. My Slackware system has
# Append any additional sh scripts found in /etc/profile.d/:
for file in /etc/profile.d/*.sh ; do
if [ -x $file ]; then
in /etc/profile to run the scripts in /etc/profile.d. Note that this
setup requires all scripts to end with `.sh' and have the executable bit
set. In _Slackware's_ /etc/profile.d, there are 2 versions of all the
scripts, one ending with `.sh' for bash & friends and one ending `.csh'
for csh and friends, which is why the .sh extension is required.