commit:     3d46659bf88caf23cfb631671dbece20bfdf8572
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  3 21:58:35 2017 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Oct  3 22:01:40 2017 +0000
URL:        https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=3d46659b

process files in /etc/profile.d before /etc/bash/bashrc for consistency

Bug: https://bugs.gentoo.org/show_bug.cgi?id=610898

 etc/profile | 11 ++++++-----
 1 file 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

Reply via email to