Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 14368 - Add a profile.d directory
Summary: Add a profile.d directory
Status: RESOLVED DUPLICATE of bug 4854
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-22 08:46 UTC by Shevek
Modified: 2005-07-17 13:06 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shevek 2003-01-22 08:46:42 UTC
It would be nice of /etc/profile executed all scripts in a /etc/profile.d
directory. I do not mean building /etc/profile as /etc/profile.env is built, I
really mean

for i in /etc/profile.d/*; do
 source $i
done

to appropriate /etc/profile files.
Comment 1 Joachim Blaabjerg (RETIRED) gentoo-dev 2003-01-22 09:09:30 UTC
Like /etc/env.d ? 
Comment 2 Shevek 2003-01-22 09:16:01 UTC
Similar to /etc/env.d. However, /etc/env.d is parsed by a python script specific
to gentoo. This python script does peculiar things, and also requires that
env-update be run. I want to be able to do things like 'eval `dircolors -b`' or
'eval `dircolors -c`' and up global aliases, etc in an appropriate fashion
without having to read through python code. It is not clear that this kind of
thing will pass through the python script, and will it pass through future
releases. Hence my explicit request for this to be managed as a shell script
modification to /etc/profile (or /etc/profile.{csh,bash}) (see SuSE, Slackware,
etc).

Putting dircolors into env.d would not be cross-shell portable. env.d seems to
be intended to be portable between csh and bash. Putting the output of dircolors
into the file would not be automatically updated when /etc/DIR_COLORS is
changed, so updating this requires N tasks (edit DIR_COLORS, rerun and insert
into env.d, rerun env-update) rather than one (edit DIR_COLORS) as is traditional.

The eventual objective is similar to /etc/env.d, except that one is guaranteed
that the file will be parsed by shell and nothing else (the shell parser is a
known quantity) and that one does not need to run env-update.
Comment 3 SpanKY gentoo-dev 2003-01-22 11:38:33 UTC
why cant you just edit /etc/profile ? 
Comment 4 Shevek 2003-01-22 11:41:22 UTC
I can edit /etc/profile but I propose this for exactly the same reasons that
env.d exists: namely it's nice to maintain things in isolation from one another,
so that customisations don't get trashed when things like profile are installed.
Currently I am editing /etc/profile and not looking forward to merging updates.
Comment 5 SpanKY gentoo-dev 2003-01-22 11:45:44 UTC
well, why not just add this after the sourcing of profile.env: 
for f in /etc/profile/profile.d/* ; do 
	source $f 
done 
 
if you want to build upon variables that were set, just be sure to do like 
export LDPATH="${LDPATH}:blah blah" 
Comment 6 Shevek 2003-01-22 12:17:42 UTC
I said exactly that in my original post and it is what I have done. It still
leaves the problem of upgrading baselayout but I guess I'll just deal with that.
I get the feeling this bug report isn't going anywhere.
Comment 7 SpanKY gentoo-dev 2003-01-22 18:39:49 UTC
you're right, i missed that 
 
i reassgined to azarah since he's the one to decide whether or not this update happens 
Comment 8 Andrew Cooks (RETIRED) gentoo-dev 2003-11-30 01:22:33 UTC
This bug has been inactive for more than 300 days.

Is this a dup of bug 4854 ?
Comment 9 Shevek 2003-11-30 06:12:32 UTC
Probably, since the dir doesn't even exist in gentoo yet.
Comment 10 Andrew Cooks (RETIRED) gentoo-dev 2003-12-01 02:41:03 UTC
Resolving...

*** This bug has been marked as a duplicate of 4854 ***