Bug 159522
| Summary: | /etc/bashrc is parsed in the wrong order from user's .bashrc | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Keith Howanitz <howanitz> |
| Component: | bash | Assignee: | Tim Waugh <twaugh> |
| Status: | CLOSED RAWHIDE | QA Contact: | Ben Levenson <benl> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| URL: | http://www.greenshire.com/notes/linux/ | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2005-07-25 10:03:05 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
/etc/skel/.bashrc is part of the bash package. Fixed in CVS. |
From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.0.4-1.3.1 Firefox/1.0.4 Description of problem: Here is the default .bashrc created for a new user: ---------- # .bashrc # User specific aliases and functions # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi ---------- However, by putting the source global definitions /after/ the user specific aliases and functions will cause the global definitions to overwrite the user specific aliases when, for example starting the gnome terminal. e.g.: alias ls='ls -aF --color' will be overwritten by alias in /etc/bashrc if put above #Source global definitions. Moving the comment orders will fix the problem - the order below will work as the user expects: ---------- # .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # User specific aliases and functions alias ls='ls -aF --color' ---------- Version-Release number of selected component (if applicable): setup-2.5.36-1 How reproducible: Always Steps to Reproduce: 1. add alias ls='ls -aF --color' to default .bashrc as 4th line 2. start gnome-terminal 3. ls Actual Results: returned ls -F --color Expected Results: returned ls -aF --color Additional info: