@@ -, +, @@ --- etc/env.d/00basic | 2 -- etc/env.d/50defaultpath | 5 +++++ etc/profile | 4 +--- 3 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 etc/env.d/50defaultpath --- a/etc/env.d/00basic +++ a/etc/env.d/00basic @@ -1,8 +1,6 @@ # /etc/env.d/00basic # Do not edit this file -PATH="/opt/bin" -ROOTPATH="/opt/bin" MANPATH="/usr/local/share/man:/usr/share/man" INFOPATH="/usr/share/info" CONFIG_PROTECT_MASK="/etc/gentoo-release" --- a/etc/env.d/50defaultpath +++ a/etc/env.d/50defaultpath @@ -0,0 +1,5 @@ +# /etc/env.d/50path +# Do not edit this file + +PATH="/usr/local/bin:/usr/bin:/bin:/opt/bin" +ROOTPATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin" --- a/etc/profile +++ a/etc/profile @@ -23,9 +23,7 @@ umask 022 # 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:+:}${ROOTPATH-}" -else - PATH="/usr/local/bin:/usr/bin:/bin${PATH:+:}${PATH-}" + PATH="${ROOTPATH}" fi export PATH unset ROOTPATH --