Red Hat Bugzilla – Bug 59446
profile.d usage differs in tcsh and bash
Last modified: 2014-03-16 22:25:26 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020205
Description of problem:
/etc/csh.login and /etc/profile are to be run once for login shells
/etc/csh.cshrc is run for every shell invocation
/etc/bashrc is run for every interactive non-login shell (via ~/.bashrc)
When are the profile.d files to be run? Every shell? This seems to be the case
with the bash startup scripts which ensure that they are run for every
interactive shell by running them from bashrc (if not login) and profile if
login. The csh scripts tell a different story. The profile.d files are only
source from /etc/login and not /etc/cshrc, so they are only run for login
shells. To be consistent the profile logic should be copied to /etc/csh.cshrc
and only run if interactive (prompt).
This was changed in July 2001, but I have no idea why since #47417 seems to be
Maybe besides "profile.d" we could have "bashrc.d" and "cshrc.d" and "login.d"
instead? Yea, I didn't think so. :-)
Fixed in 2.5.8-1.