Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/baselayout:master commit in: etc/
Date: Thu, 01 Sep 2016 19:03:24
Message-Id: 1472756463.89f852f823cad807dc360325ec92817e583835e8.williamh@gentoo
1 commit: 89f852f823cad807dc360325ec92817e583835e8
2 Author: Martin Vath <martin <AT> mvath <DOT> de>
3 AuthorDate: Thu Sep 1 18:24:48 2016 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 1 19:01:03 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=89f852f8
7
8 etc/profile: Make set -u work for the profile
9
10 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=555762
11
12 etc/profile | 8 ++++----
13 1 file changed, 4 insertions(+), 4 deletions(-)
14
15 diff --git a/etc/profile b/etc/profile
16 index 11336fb..e085efa 100644
17 --- a/etc/profile
18 +++ b/etc/profile
19 @@ -22,15 +22,15 @@ umask 022
20 # There's no real reason to exclude sbin paths from the normal user,
21 # but it can make tab-completion easier when they aren't in the
22 # user's PATH to pollute the executable namespace.
23 -if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then
24 - PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}"
25 +if [ "${EUID-}" = "0" ] || [ "${USER-}" = "root" ] ; then
26 + PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin${ROOTPATH:+:}${ROOTPATH-}"
27 else
28 - PATH="/usr/local/bin:/usr/bin:/bin:${PATH}"
29 + PATH="/usr/local/bin:/usr/bin:/bin${PATH:+:}${PATH-}"
30 fi
31 export PATH
32 unset ROOTPATH
33
34 -if [ -n "${BASH_VERSION}" ] ; then
35 +if [ -n "${BASH_VERSION-}" ] ; then
36 # Newer bash ebuilds include /etc/bash/bashrc which will setup PS1
37 # including color. We leave out color here because not all
38 # terminals support it.