[clue-tech] profile.d why

marcus hall marcus at tuells.org
Fri Jan 7 14:40:02 MST 2005


On Fri, Jan 07, 2005 at 01:44:48PM -0700, Jef Barnhart wrote:

> I'm looking for info on why /etc/profile.d exists.
...
> I have checked with pathname.org and linuxbase.org, nothing. So I am
> comming to you and asking WHY?

I don't know specifically why /etc/profile.d exists, but in general one
of the reasons that configuration information is placed in individual files
within a directory is for easier package management.

For instance, inetd used to be driven off of /etc/inetd.conf (I think that
was the filename, it was a single file though).  Now, each line from that
file is a single file within the /etc/xinetd.d directory.  That way, when
the rsync package, for instance, is added or removed, the /etc/xinetd.d/rsync
file is added or removed with the package.  It is much easier than trying
to filter /etc/inetd.conf to add or delete a specific line, and especially
consider the consequences of getting the filtering wrong.

So, one motivation for /etc/profile.d may be that when you add a package,
it may put an entry in /etc/profile.d to adjust everybody's environment
a little (perhaps to add an element to $PATH or something).

Marcus Hall
marcus at tuells.org



More information about the clue-tech mailing list