We would sanitize $RC_LIBDIR/sbin as well. If it's really needed then rc-functions.sh will add it back.

This commit is contained in:
Roy Marples 2008-03-27 18:34:12 +00:00
parent 4e9b58b07d
commit 742310744d

View File

@ -43,7 +43,8 @@ _sanitize_path()
local IFS=":" p= path=
for p in ${PATH}; do
case "${p}" in
@PREFIX@/@LIB@/rc/bin|@PREFIX@/bin|@PREFIX@/sbin|/usr/bin|/usr/sbin);;
@PREFIX@/@LIB@/rc/bin|@PREFIX@/@LIB@/rc/sbin);;
@PREFIX@/bin|@PREFIX@/sbin|/usr/bin|/usr/sbin);;
@PKG_PREFIX@/bin|@PKG_PREFIX@/sbin);;
@LOCAL_PREFIX@/bin|@LOCAL_PREFIX@/sbin);;
*) path="${path}${path:+:}${p}";;
@ -79,8 +80,9 @@ fi
if [ -n "${_LOCAL_PREFIX}" ]; then
_PATH="${_PATH}:${_LOCAL_PREFIX}/bin:${_LOCAL_PREFIX}/sbin"
fi
export PATH="${_PATH}:$(_sanitize_path "${PATH}")"
unset _sanitize_path _PREFIX _PKG_PREFIX _LOCAL_PREFIX _PATH
_path="$(_sanitize_path "${PATH}")"
export PATH="${_PATH}${_path:+:}${_path}"
unset _sanitize_path _PREFIX _PKG_PREFIX _LOCAL_PREFIX _PATH _path
for arg; do
case "${arg}" in