diff options
-rw-r--r-- | sh/functions.sh.in | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sh/functions.sh.in b/sh/functions.sh.in index 174adc20..25462331 100644 --- a/sh/functions.sh.in +++ b/sh/functions.sh.in @@ -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 |