Bug 10242 - RHL 6.1 "etcskel" shell startup scripts
Summary: RHL 6.1 "etcskel" shell startup scripts
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: bash   
(Show other bugs)
Version: 6.1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-03-19 19:56 UTC by swear
Modified: 2008-05-01 15:37 UTC (History)
0 users

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

Attachments (Terms of Use)

Description swear 2000-03-19 19:56:48 UTC
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 23:42:38 UTC
Assigning to bash, that's where these scripts live these days.

Comment 2 Bernhard Rosenkraenzer 2001-05-23 07:57:35 UTC
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.