commit:     89f852f823cad807dc360325ec92817e583835e8
Author:     Martin Vath <martin <AT> mvath <DOT> de>
AuthorDate: Thu Sep  1 18:24:48 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Sep  1 19:01:03 2016 +0000
URL:        https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=89f852f8

etc/profile: Make set -u work for the profile

X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=555762

 etc/profile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/etc/profile b/etc/profile
index 11336fb..e085efa 100644
--- a/etc/profile
+++ b/etc/profile
@@ -22,15 +22,15 @@ umask 022
 # There's no real reason to exclude sbin paths from the normal user,
 # but it can make tab-completion easier when they aren't in the
 # user's PATH to pollute the executable namespace.
-if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then
-       
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}"
+if [ "${EUID-}" = "0" ] || [ "${USER-}" = "root" ] ; then
+       
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin${ROOTPATH:+:}${ROOTPATH-}"
 else
-       PATH="/usr/local/bin:/usr/bin:/bin:${PATH}"
+       PATH="/usr/local/bin:/usr/bin:/bin${PATH:+:}${PATH-}"
 fi
 export PATH
 unset ROOTPATH
 
-if [ -n "${BASH_VERSION}" ] ; then
+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
        # terminals support it.

Reply via email to