Red Hat Bugzilla – Bug 382
/etc/skel/.bash_profile is broken
Last modified: 2008-05-01 11:37:48 EDT
The default .bash_profile shipped with Red Hat 5.1 includes
the following line:
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.
Confirmed in version 5.2 as well.
It is fixed in 5.2