Re: Where is a good reference for setting PATH in all the various shells

"Göran Uddeborg" <uddeborg-/[email protected]>
Newsgroups gmane.linux.redhat.taroon
Message-ID <[email protected]>
Ed Wilts writes:
> The biggest reason is that every shell would have to be modified to
> consult this file.

Not really.  You could have code in the startup scripts which used
this file.  If for example, /etc/defaultpath contains just a
colon-separated path, you could add

    PATH=`cat /etc/defaultpath`

in the startup scripts for the Bourne shell family (like bash), and

    setenv PATH `cat /etc/defaultpath`

to the scripts for the csh family.  The file /etc/defaultpath itself
does not need to be different, nor do the shells themselves need to be
changed.

Chris Kloiber writes:
> Is there a problem with /etc/profile.d ?

You probably want to do this in /etc/profile and /etc/csh.* before you
run the scripts in /etc/profile.d.  Those scripts could want to add to
the path, while /etc/defaultpath should override any previous path.
So the default path should be set first.


--
Taroon-beta-list mailing list
[email protected]
http://www.redhat.com/mailman/listinfo/taroon-beta-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.