diff options
author | William Hubbs <williamh@gentoo.org> | 2017-10-03 16:58:35 -0500 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2017-10-03 17:01:40 -0500 |
commit | 3d46659bf88caf23cfb631671dbece20bfdf8572 (patch) | |
tree | ce8324c847aabef22ae2b10f456478287e65491b /etc | |
parent | version 2.5 (diff) | |
download | baselayout-3d46659bf88caf23cfb631671dbece20bfdf8572.tar.gz baselayout-3d46659bf88caf23cfb631671dbece20bfdf8572.tar.bz2 baselayout-3d46659bf88caf23cfb631671dbece20bfdf8572.zip |
process files in /etc/profile.d before /etc/bash/bashrc for consistency
Bug: https://bugs.gentoo.org/show_bug.cgi?id=610898
Diffstat (limited to 'etc')
-rw-r--r-- | etc/profile | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/etc/profile b/etc/profile index 75c1f870..8e92e824 100644 --- a/etc/profile +++ b/etc/profile @@ -28,6 +28,12 @@ fi export PATH unset ROOTPATH +# process *.sh files in /etc/profiled.d +for sh in /etc/profile.d/*.sh ; do + [ -r "$sh" ] && . "$sh" +done +unset sh + if [ -n "${BASH_VERSION-}" ] ; then # Newer bash ebuilds include /etc/bash/bashrc which will setup PS1 # including color. We leave out color here because not all @@ -50,8 +56,3 @@ else # understand sequences such as \h, don't put anything special in it. PS1="${USER:-$(whoami 2>/dev/null)}@$(uname -n 2>/dev/null) \$ " fi - -for sh in /etc/profile.d/*.sh ; do - [ -r "$sh" ] && . "$sh" -done -unset sh |