From 89f852f823cad807dc360325ec92817e583835e8 Mon Sep 17 00:00:00 2001 From: Martin Vath Date: Thu, 1 Sep 2016 13:24:48 -0500 Subject: 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 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. -- cgit v1.2.3-18-g5258