Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 336568

Summary: /etc/bash/bashrc need /etc/profile.d/*.sh
Product: Gentoo Linux Reporter: coderoar
Component: [OLD] Core systemAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED INVALID    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://bugs.gentoo.org/show_bug.cgi?id=4854
Whiteboard:
Package list:
Runtime testing required: ---

Description coderoar 2010-09-09 08:35:36 UTC
Now /etc/profile.d has bash-completion.sh and java-config-2.sh, and only /etc/profile sources /etc/profile.d/*.sh. So that non-login shells can't get bash completion and java environment variables.

The condition is serious when I enter a shell with 'sudo -s', which means that I must work without bash completion.

My suggestion is to let /etc/bash/bashrc source /etc/profile.d/*.sh. Further, since /etc/profile sources /etc/bash/bashrc, /etc/profile needn't /etc/profile.d/*.sh any more if /etc/bash/bashrc instead of it.
Comment 1 SpanKY gentoo-dev 2010-09-14 14:02:39 UTC
no, bashrc files are for *non-login* shells.  profile.d are for *login* shells.  login shells source non-login files, but never the other way around.