On Thu, Jun 08, 2000 at 11:41:15AM +0100, Graeme Mathieson wrote: > > Is there a mechanism for individual packages to update /etc/profile? For > instance, it's a pest for each of your users, individually, to have to > update their path to include /usr/bin/mh for nmh. for PATH updates /etc/profile should be fixed, redhats profile.d concoction does a horrible job of setting the PATH, i usually end up with directories being listed twice, a la /usr/local/bin:/usr/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin ugly ugly ugly > And putting stuff in /etc/skel doesn't solve the problem of rolling changes > out to existing users. /etc/profile, what i mean by using /etc/skel is for things that are clearly user preferences and not critical to a functioning account. things like aliases, fancy PS1 prompts etc things that matter such as PATH and MANPATH do indeed belong in /etc/profile. > OK, so cross-shell compatibility doesn't worry me, since bash is the only > shell used[1]. I have a profile.d directory with a selection of scripts, > including one to add nmh to $PATH, one to set the default $CVSROOT and > $CVS_RSH and one to do colour-ls. These scripts are rolled out from a > config-server (currently just using opt-depot, but eventually using > cfengine). why use a bunch of little files? if you just push these to all the machines anyhow just edit /etc/profile and push that. the environment is all in one place that users can actually find, and its setup much cleaner then a kludge sourcing zillions of files scattered about. i really fail to see why using the already existing system of /etc/profile (and other shells equivilant) is a problem that requires a profile.d kludge. one way or another you have lots of files, lots of files that need to be modified once in a while. > [1] By policy. No other shells are installed, and users cannot run chsh > anyway. first point is true, second point is rubbish ;-) erb@socrates ~]$ chsh Password: Changing the login shell for erb Enter the new value, or press return for the default Login Shell [/bin/bash]: /bin/csh erb@socrates ~]$ cat /etc/passwd | grep erb | awk -F: '{print $7}' /bin/csh erb@socrates ~]$ chsh Password: Changing the login shell for erb Enter the new value, or press return for the default Login Shell [/bin/csh]: /bin/bash erb@socrates ~]$ cat /etc/passwd | grep erb | awk -F: '{print $7}' /bin/bash erb@socrates ~]$ seems to work fine here. and no i have not changed anything in my configuration in regards to chsh. -- Ethan Benson http://www.alaska.net/~erbenson/
Attachment:
pgp74fmzgiYvL.pgp
Description: PGP signature