Bug 123621

Summary: /etc/profile unsets "pathmunge" too early
Product: [Fedora] Fedora Reporter: Florin Andrei <florin>
Component: setupAssignee: Phil Knirsch <pknirsch>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: rvokal, scop
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: 2.5.34-1 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-01-31 12:56:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Florin Andrei 2004-05-19 18:28:05 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040116

Description of problem:
In /etc/profile, after a few "pathmunge" statements, that function is
disabled:

unset pathmunge

However, this prevents users and RPM package makers to use the
function in files that get installed in /etc/profile.d

Case in point, i want to set a PATH component for my Java
installation. Since editing /etc/pofile is not nice, and since making
that kind of changes is best accomplished with a new file in
/etc/profile, i'd like to be able to use the pathmunge() function in
my custom file in /etc/profile.d
However, i cannot accomplish that unless i comment out "unset pathmunge".

Version-Release number of selected component (if applicable):
setup-2.5.33-1

How reproducible:
Always

Steps to Reproduce:
1.add a file to /etc/profile.d that uses the pathmunge() function
2.
3.
    

Actual Results:  the pathmunge() call fails

Expected Results:  pathmunge() should work in files in /etc/profile.d

Additional info:

Comment 1 Bill Nottingham 2004-05-24 21:39:37 UTC
Will be in 2.5.34-1, thanks!

Comment 2 Ville Skyttä 2005-12-01 11:08:19 UTC
Unfortunately recent versions (at least as of FC4 and FC5test1) of the setup
package also pull in the profile.d snippets directly from /etc/bashrc where
pathmunge is not defined, so it cannot be used anyway :(

Comment 3 Phil Knirsch 2006-01-31 12:56:06 UTC
OK, i've looked at it a little more closely.

Problem is that for non login shells bashrc now sources the profile.d files. The
next rawhide version will contain a fix that includes pathmunge in bashrc again
for that case.

Read ya, Phil