diff options
author | Martin Vath <martin@mvath.de> | 2016-09-01 13:24:48 -0500 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2016-09-01 14:01:03 -0500 |
commit | 89f852f823cad807dc360325ec92817e583835e8 (patch) | |
tree | 07e683cae2ecb86736cfb1035da7fa06e3b5e0c0 /etc | |
parent | etc.Linux/sysctl.comf: disable rp_filter by default (diff) | |
download | baselayout-89f852f823cad807dc360325ec92817e583835e8.tar.gz baselayout-89f852f823cad807dc360325ec92817e583835e8.tar.bz2 baselayout-89f852f823cad807dc360325ec92817e583835e8.zip |
etc/profile: Make set -u work for the profile
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=555762
Diffstat (limited to 'etc')
-rw-r--r-- | etc/profile | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/profile b/etc/profile index 11336fba..e085efa3 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. |