Summary: | bash-3.0-r11 only sources /etc/bash/bashrc for non-login shells | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Matt Whitlock <gentoo> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED INVALID | ||
Severity: | minor | ||
Priority: | Normal | ||
Version: | 2005.0 | ||
Hardware: | x86 | ||
OS: | All | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | /etc/bash/bashrc |
Description
Matt Whitlock
2005-04-30 15:34:02 UTC
Created attachment 57693 [details]
/etc/bash/bashrc
This should be identical to the distributed /etc/bash/bashrc.
mattw@gentoo ~ $ echo ${use_color} mattw@gentoo ~ $ su - mattw Password: mattw@gentoo ~ $ echo ${use_color} mattw@gentoo ~ $ logout mattw@gentoo ~ $ su mattw Password: mattw@gentoo ~ $ echo ${use_color} true sounds like your /etc/profile still refers to /etc/bashrc Indeed my /etc/profile was still referring to /etc/bashrc. I remerged baselayout and now it uses /etc/bash/bashrc. I have no clue why /etc/profile wasn't updated when I originally updated to baselayout-1.11.11-r3. I hasn't touched it. Thanks though! that is weird ... i put 1.11.11-r3 in specifically to update /etc/profile :x Im haveing the exact same problem. since updateing to emerge bash baselayout -p These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild R ] app-shells/bash-3.0-r11 [ebuild R ] sys-apps/baselayout-1.11.11-r3 I have no color prompt I have " . /etc/profile " and I have .bash_profile and .bashrc in home. ANd I just noticed this. root@tester ~ # . .bashrc root@tester ~ # . /etc/profile root@tester ~ # emerge baselayout -p These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild R ] sys-apps/baselayout-1.11.11-r3 root@tester ~ # cat /etc/proflie cat: /etc/proflie: No such file or directory root@tester ~ # which cat /usr/bin/cat root@tester ~ # /usr/bin/cat /etc/proflie /usr/bin/cat: /etc/proflie: No such file or directory Also this root@tester ~ # ls /etc/bash* bash_logout bashrc root@tester ~ # cat /etc/bashrc cat: /etc/bashrc: No such file or directory root@tester ~ # ll /etc/bashrc ls: /etc/bashrc: No such file or directory root@tester ~ # ll /etc/bash* total 8.0K -rw-r--r-- 1 root root 132 May 2 15:59 bash_logout -rw-r--r-- 1 root root 1.7K May 2 15:59 bashrc root@tester ~ # less /etc/bashrc /etc/bashrc: No such file or directory This happening in multi-gnome terminal and in my consules. Whats strange to me is I start X with "startxfce4" and that worked but as above source /etc/profile and "set PS1="blah from profile" doesnt. If I su as root or usr and give the root password im returened to the origianl usr with color prompt. I also re-emerged baselayout and bash with no change. :( Ok to clarify my last comment when I su I do change to root. Before su PS1='\u@\h \w \$ ' after su PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]'. After su if I exit back to user PS1 is set correctly. Its late and my brain is shuting down. Its /etc/bash/bashrc not /etc/bashrc which from /etc/profile if [ -n "${BASH_VERSION}" ]; then # Newer bash ebuilds include /etc/bashrc which will setup PS1 # including color. We leave out color here because not all # terminals support it. ====> if [ -f /etc/bashrc ]; then # Bash login shells run only /etc/profile and # Bash non-login shells run only /etc/bashrc below # Since we want to run /etc/bashrc always we source it # from here. It is unfortunate that there is no way to do # this *after* the user's .bash_profile runs (without putting # it in the user's dot-files), but it shouldn't make any # difference. ==========> . /etc/bashrc <========= else PS1='\u@\h \w \$ ' fi should be ". /etc/bash/bashrc" |