Subject: RE: /etc/profile in BASH
From: "Masterson, Dave" <[email-masked]>
To: "'Earnie Boyd'" <[email-masked]>, "Masterson, Dave" <[email-masked]>
Cc: "[email-masked]'" <[email-masked]>
Date: Fri, 29 Sep 2000 11:52:39 -0700

I gotta learn to read more carefully... :-\

One more time -- having these two lines in /etc/profile means that
~/.profile will be (potentially) sourced twice (~/.bashrc might be as well
depending on how the user handles it in ~/.profile).  This could have
unintended consequences where people *add-to* instead of *set* their
environment variables -- particularly PATH.  This could double the length of
the PATH variable and slow down access to commands (particularly if one or
more items on the PATH is a network share).

Also, in order to be compatible with other UNIX system shells (Kshell), a
user may have setup ~/.profile particularly for KShell and ~/.bash_profile
particularly for BASH.  Since BASH will not read ~/.profile if it finds
~/.bash_profile (or ~/.bash_login), the user does not have to do any testing
in his .profile to handle BASH vs. KSH idiosyncracies.  With SAMBA, NFS, and
such, it is possible that the user has one and only one HOME directory that
is used on all systems.  Sourcing ~/.profile out of /etc/profile could cause
the wrong setup to occur (remember the previous paragraph).

> -----Original Message-----
> From: Earnie Boyd [mailto:[email-masked]]
> Sent: Friday, September 29, 2000 11:36 AM
> To: Masterson, Dave
> Cc: [email-masked]'
> Subject: RE: /etc/profile in BASH
> 
> 
> --- "Masterson, Dave" <[email-masked]> wrote:
> > Doh! You're right!  Memory is the second thing to go as you 
> > get older...
> > 
> > However, I still don't think these two lines to run 
> > ~/.profile and ~/.bashrc
> > belong in /etc/profile (neither does "cd $HOME").  They subvert the
> > "--noprofile" and "--norc" options to BASH.
> > 
> 
> Subvert --noprofile?  No, /etc/profile wouldn't be sourced.  
> Subvert --norc? 
> No, /etc/profile isn't sourced unless it's login and 
> ~/.bashrc isn't sourced if
> it is login.

--
Want to unsubscribe from this list?
Send a message to [email-masked]