Re: Where is a good reference for setting PATH in all the various shells
"Aaron Neerenberg" <aaron_neerenberg-qW2v0nlJ07xWk0Htik3J/[email protected]>
| Newsgroups | gmane.linux.redhat.taroon |
|---|---|
| Organization | Credence Systems |
| Message-ID | <1063301262.1381.5.camel@aneerenb-lnx2> |
Let me suggest that you read the man page entries for the various shells
you are interested in working with. For example, the man page for bash
states:
When bash is invoked as an interactive login shell, or as a
non-interactive shell with the --login option, it first reads and
executes commands from the file /etc/profile, if that file exists.
After reading that file, it looks for ~/.bash_profile, ~/.bash_login,
and ~/.profile, in that order, and reads and executes commands from the
first one that exists and is readable. The --noprofile option may be
used when the shell is started to inhibit this behavior.
-Aaron
On Thu, 2003-09-11 at 09:13, Douglas Phillipson wrote:
> OK, I was trying not to show my ignorance on this matter but I guess
> I'll have to by asking some direct questions. I don't understand the
> /etc/profile.d mechanism. When do these scripts get run? Automaticly
> during boot, or when some app intentionally runs them, at some run
> level, when? If I put a script that sets and EXPORTS PATH there does it
> get run automaticly and will bash use that path?
>
> Regards
>
> DSP
>
> John wrote:
> > On Thursday 11 September 2003 15:24, Göran Uddeborg wrote:
> >
> >>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`
> >
> >
> > You would need to take care with that, because other scripts in /etc/profile.d
> > may change PATH.
> >
> > You need to split /etc/defaultpath, and only add to PATH those bits that are
> > necessary.
> >
> > RH, but not user sites, could modify /etc/proiile & /etc/csh.cshrc to do that
> > before looking in /etc/profile.d
> >
> >
> >
>
>
> --
> Taroon-beta-list mailing list
> [email protected]
> http://www.redhat.com/mailman/listinfo/taroon-beta-list
--
Aaron Neerenberg
Software Infrastructure Team
Credence Systems Corporation
1-(503)-466-7828
--
Taroon-beta-list mailing list
[email protected]
http://www.redhat.com/mailman/listinfo/taroon-beta-list