On Wednesday 03 May 2006 22:56, Bill Allombert wrote: > On Thu, Apr 27, 2006 at 12:53:01PM +0200, cobaco (aka Bart Cornelis) wrote: > > On Sunday 23 April 2006 20:26, Russ Allbery wrote: > > > Jari Aalto <[EMAIL PROTECTED]> writes: > > > > What we need and what should have been done a long time ago, is to > > > > modularize profile to /etc/profile.d/ where each program is > > > > resposible for shipping reasonable defaults. Redhad has done this > > > > long time and Cygwin does that too and it works very well. > > I suggest the post below that detail how they use it and why > this is not needed in Debian: > > <http://lists.debian.org/debian-policy/2004/06/msg00136.html>
I'll take the various arguments in that mail and give my take on it (correct me if I misinterpreted anything): <quote> Debian shells are not required to be POSIX compliant, only /bin/sh. In practice, I expect you will have a hard time to write shell scripts that are valid for both tcsh and bash. </quote> /etc/profile is only used by bourne-compatible shells (of which tcsh isn't one). Most things can be writte in a way that's valid for all bourne-compatible shells, and any bits that can't can easily be wrapped in an appropriate if-statement <quote> I would like to point out that the correct way in Debian to set environnement variable for all users is to use /etc/environnement. <quote> while very true, this is not a valid objection: - there's no way to conditionally set variables through /etc/environment. Sometimes you want to influence things through environment variables based on run-time tests (see for example my desktop-profiles package which does exatly that in order to fix a corner-case bug for those shells that allow it) - configuration packages are another valid use case (see below) One approach will never fit everyone: where one person sees bloat another sees service. (I think we can all agree on that?). In light of that it makes sense to offer a mechanism through which people can pick and choose the level of service/bloat they want. Which is exactly what modularizing /etc/profile would allow (through configuration packages that implement a particular level of service/bloat). NOTE: this does not get in the way of base-files only offering a minimal level of bloat/service. As for the whole part of the mail critizing the redhat bloat, it's irrelevant if somebody wants to provide a configuration package implementing the exact set of bloat/service offered by redhat then that's fine. Only those users that want it will install it. > In that case, I would suggest to introduce a /etc/bashrc.d and > /etc/kshrc.d rather than a /etc/profile.d. Why split it per bourne-shell-variant? - Most things can be put in a way that's valid for all bourne-compatible shells (i.e. those using /etc/profile). - Those few bits that are specic to 1 shell-variant can easily be surrounded by an appropriate if-statement as the start of this bug illustrates. -- Cheers, cobaco (aka Bart Cornelis)
pgpZokFWFaOiC.pgp
Description: PGP signature