Gentoo Archives: gentoo-dev

From: Martin Schlemmer <azarah@g.o>
To: gentoo-dev@l.g.o
Cc: Mike Frysinger <vapier@g.o>
Subject: Re: [gentoo-dev] /etc/profile.d/
Date: Sat, 16 Jul 2005 20:59:00
Message-Id: 1121547481.7325.64.camel@lycan.lan
In Reply to: Re: [gentoo-dev] /etc/profile.d/ by Marius Mauch
1 On Sat, 2005-07-16 at 19:03 +0200, Marius Mauch wrote:
2 > On Fri, 15 Jul 2005 21:34:09 -0400
3 > Mike Frysinger <vapier@g.o> wrote:
4 >
5 > > we could care less what users do with /etc/profile.d ... the point is
6 > > that *only* users should use /etc/profile.d ... we dont want random
7 > > Gentoo developer Foo installing some Bar.sh into /etc/profile.d with
8 > > package app-crap/FooBar
9 >
10 > Would the following in /et/profile be a solution to this problem?
11 >
12 > for x in $( < /etc/profile.d/.default); do
13 > source "/etc/profile.d/${x}"
14 > done
15 >
16 > That way devs could install stuff there, but it would only be run if
17 > users added it to the .default file.
18
19 If we do something like this, I'll rather not source it, but run it via
20 the current shell. This should discourage devs to install stuff
21 touching the environment there rather than /etc/env.d/.
22
23 -----
24 # Append any additional sh scripts found in /etc/profile.d/:
25 for file in /etc/profile.d/*.sh ; do
26 if [ -x "${file}" ] ; then
27 "${file}"
28 fi
29 done
30 -----
31
32
33 As for above, this is one of the examples why we rather did not add
34 it .. everybody want something added .. global control, per user
35 control, etc :/
36
37
38 --
39 Martin Schlemmer

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] /etc/profile.d/ Mike Frysinger <vapier@g.o>