Bug 59446 - profile.d usage differs in tcsh and bash
profile.d usage differs in tcsh and bash
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: setup (Show other bugs)
7.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-02-07 21:39 EST by Jim Radford
Modified: 2014-03-16 22:25 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-02-25 12:48:06 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jim Radford 2002-02-07 21:39:18 EST
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
secret.

Maybe besides "profile.d" we could have "bashrc.d" and "cshrc.d" and "login.d"
instead?  Yea, I didn't think so. :-)
Comment 1 Bill Nottingham 2002-03-11 12:18:15 EST
Fixed in 2.5.8-1.

Note You need to log in before you can comment on or make changes to this bug.