Bug 382 - /etc/skel/.bash_profile is broken
Summary: /etc/skel/.bash_profile is broken
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: etcskel
Version: 5.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1998-12-10 17:59 UTC by Patrick J. LoPresti
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1998-12-11 22:52:11 UTC


Attachments (Terms of Use)

Description Patrick J. LoPresti 1998-12-10 17:59:40 UTC
The default .bash_profile shipped with Red Hat 5.1 includes
the following line:

  ENV=$HOME/.bashrc

This is broken.  ENV is a Posix 1003.2 concept.  It is
recognized by *any* Bourne shell, not just bash.  As such,
it should not be pointing at a .bashrc file!

This is causing real problems for us in our cross-platform
environment.  Our users have their home directories on a
Linux server, and they usually use bash as their login
shell.  Thanks to this erroneous .bash_profile, ENV ends up
set to $HOME/.bashrc in their environment.

When they run /bin/sh scripts on a non-Linux system, that
system's /bin/sh (if it is Posix compliant) uses the
contents of ENV as an initialization script.  Such a Posix
compliant /bin/sh which is not bash will choke on the
bash-specific data in .bashrc.  The result is that *all*
shell scripts fail.

You can fix this either by eliminating the ENV= line (I do
not see what possible use it has in the first place), or by
using BASH_ENV instead of ENV.

 - Pat

Comment 1 Jay Turner 1998-12-10 18:41:59 UTC
Confirmed in version 5.2 as well.

Comment 2 Cristian Gafton 1998-12-11 22:52:59 UTC
It is fixed in 5.2


Note You need to log in before you can comment on or make changes to this bug.