Bash question

Mike B thaz at if.rmci.net
Mon Jul 9 09:04:10 PDT 2001


A bash behavior hint would be nice, if you could include common configuration theory that would be great too!

* Loftus Law: Some people manage by the book, even though they do not know who wrote the book or even which book it is.


-----Original Message-----
FROM: Adrian Ho
TO: lfs-discuss at linuxfromscratch.org
DATE: Mon 7/9/01 7:52
SUBJECT: Re: Bash question

On Mon, Jul 09, 2001 at 07:04:35AM -0500, Baker wrote:
> For some reason, bash will not execute any users .bashrc files.
> From the research I have done, it looks like bash will ignore a .bashrc
> file if it is being run in 1) non-interactive mode or 2) was compiled
> with --norc.

That's a run-time option, not a compile-time one.

And you forgot a few more qualifications:

3) was invoked as "sh" rather than "bash", interactive or not
4) was invoked as an interactive login shell
5) was invoked with the --posix option

~/.bashrc is only invoked:

1) by a interactive non-login shell whose command name is "bash",
2) when explicitly sourced by another startup script,
3) when set as the value of the BASH_ENV environment variable before
   invoking bash, or
4) when bash is invoked by rshd (an obscure case that's not much relevant
   in today's security-conscious world)

I can write up a hint, if anyone's interested.  Bash's startup behavior
seems to be a perpetual source of confusion, even amongst seasoned admins
and even with the comprehensive docs included with the sources.

- Adrian
-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message


-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message



More information about the lfs-dev mailing list