From 742310744d61a2bc2553f8c34aededf30fea3f18 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 27 Mar 2008 18:34:12 +0000 Subject: We would sanitize $RC_LIBDIR/sbin as well. If it's really needed then rc-functions.sh will add it back. --- sh/functions.sh.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sh/functions.sh.in') 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 -- cgit v1.2.3