Bug 59446 - profile.d usage differs in tcsh and bash
Summary: profile.d usage differs in tcsh and bash
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: setup
Version: 7.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-02-08 02:39 UTC by Jim Radford
Modified: 2014-03-17 02:25 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2002-02-25 17:48:06 UTC
Embargoed:


Attachments (Terms of Use)

Description Jim Radford 2002-02-08 02:39:18 UTC
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 17:18:15 UTC
Fixed in 2.5.8-1.


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