Bug 10242 - RHL 6.1 "etcskel" shell startup scripts
RHL 6.1 "etcskel" shell startup scripts
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: bash (Show other bugs)
6.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-03-19 14:56 EST by swear
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-01-30 18:42:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description swear 2000-03-19 14:56:48 EST
The shell startup scripts are kinda funky.  When starting a
non-interactive login shell, ~/.bashrc is sourced twice, once from
~/.bash_profile and again as $BASH_ENV. See bash man page.  (Also bad
because it uneccessarily causes ~/.bashrc to run in non-interactive,
non-login shells, when none is needed.)

Now, bash's startup script needs are confusingly awkward, but here's one
way to handle it: Put everything in a bashrc file in two sections, one
for exported stuff, one for non-exported stuff, each protected by it's
own environmental variable such that when the variables are undefined,
only the non-exported stuff is used (like a normal bashrc file). Then
source the file from a profile file with variables set so both parts are
used.  (If someone wants to use ENV or BASH_ENV, they can have the
profile file cause only the first part of the bashrc file to be used
from the profile file.)
Comment 1 Bill Nottingham 2001-01-30 18:42:38 EST
Assigning to bash, that's where these scripts live these days.
Comment 2 Bernhard Rosenkraenzer 2001-05-23 03:57:35 EDT
Fixed in 2.05-5, we're no longer setting BASH_ENV.

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