Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 382

Summary: /etc/skel/.bash_profile is broken
Product: [Retired] Red Hat Linux Reporter: Patrick J. LoPresti <lopresti>
Component: etcskelAssignee: Cristian Gafton <gafton>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1998-12-11 22:52:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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