From 984558a3252dc887009b8b8364bef98c8f0748fc Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Wed, 7 Jun 2017 17:22:56 -0500 Subject: [PATCH] Move default path to env.d --- 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 diff --git a/etc/env.d/00basic b/etc/env.d/00basic index 363bc968..68ddf7e9 100644 --- a/etc/env.d/00basic +++ b/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" diff --git a/etc/env.d/50defaultpath b/etc/env.d/50defaultpath new file mode 100644 index 00000000..1ab77dfd --- /dev/null +++ b/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" diff --git a/etc/profile b/etc/profile index e085efa3..75c1f870 100644 --- a/etc/profile +++ b/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 -- 2.13.0