From 3d46659bf88caf23cfb631671dbece20bfdf8572 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Tue, 3 Oct 2017 16:58:35 -0500 Subject: 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 -- cgit v1.2.3-65-gdbad