From e47661449a7fe3c52ff0b5766bfa54699e1030bd Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 21 Mar 2008 00:30:22 +0000 Subject: More pathing fixes. --- sh/functions.sh.in | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sh/functions.sh.in b/sh/functions.sh.in index 1a71fbd3..c0b05c7e 100644 --- a/sh/functions.sh.in +++ b/sh/functions.sh.in @@ -66,7 +66,13 @@ _PREFIX=@PREFIX@ _PKG_PREFIX=@PKG_PREFIX@ _LOCAL_PREFIX=@LOCAL_PREFIX@ _LOCAL_PREFIX=${_LOCAL_PREFIX:-/usr/local} -_PATH=@PREFIX@/lib/rc/bin:/bin:/sbin:/usr/bin:/usr/sbin +_PATH=@PREFIX@/lib/rc/bin +case "${_PREFIX}" in + "${_PKG_PREFIX}"|"${_LOCAL_PREFIX}") ;; + *) _PATH="${_PATH}:${_PREFIX}/bin:${_PREFIX}/sbin";; +esac +_PATH="${_PATH}":/bin:/sbin:/usr/bin:/usr/sbin + if [ -n "${_PKG_PREFIX}" ]; then _PATH="${_PATH}:${_PKG_PREFIX}/bin:${_PKG_PREFIX}/sbin" fi @@ -93,7 +99,7 @@ else # the last ecmd for _e in ebegin eend error errorn einfo einfon ewarn ewarnn ewend \ vebegin veend veinfo vewarn vewend; do - eval "${_e}() { local _r; /lib/rc/bin/${_e} \"\$@\"; _r=$?; \ + eval "${_e}() { local _r; @PREFIX@/lib/rc/bin/${_e} \"\$@\"; _r=$?; \ export EINFO_LASTCMD=${_e}; return \$_r; }" done fi -- cgit v1.2.3