Fix mulitlib issues.

This commit is contained in:
Roy Marples 2008-03-27 16:53:22 +00:00
parent f6cb321f9f
commit b3d1182a2f
3 changed files with 9 additions and 9 deletions

View File

@ -43,7 +43,7 @@ _sanitize_path()
local IFS=":" p= path= local IFS=":" p= path=
for p in ${PATH}; do for p in ${PATH}; do
case "${p}" in case "${p}" in
@PREFIX@/lib/rc/sbin|@PREFIX@/bin|@PREFIX@/sbin|/usr/bin|/usr/sbin);; @PREFIX@/@LIB@/rc/sbin|@PREFIX@/bin|@PREFIX@/sbin|/usr/bin|/usr/sbin);;
@PKG_PREFIX@/bin|@PKG_PREFIX@/sbin);; @PKG_PREFIX@/bin|@PKG_PREFIX@/sbin);;
@LOCAL_PREFIX@/bin|@LOCAL_PREFIX@/sbin);; @LOCAL_PREFIX@/bin|@LOCAL_PREFIX@/sbin);;
*) path="${path}${path:+:}${p}";; *) path="${path}${path:+:}${p}";;
@ -66,7 +66,7 @@ _PREFIX=@PREFIX@
_PKG_PREFIX=@PKG_PREFIX@ _PKG_PREFIX=@PKG_PREFIX@
_LOCAL_PREFIX=@LOCAL_PREFIX@ _LOCAL_PREFIX=@LOCAL_PREFIX@
_LOCAL_PREFIX=${_LOCAL_PREFIX:-/usr/local} _LOCAL_PREFIX=${_LOCAL_PREFIX:-/usr/local}
_PATH=@PREFIX@/lib/rc/bin _PATH=@PREFIX@/@LIB@/rc/bin
case "${_PREFIX}" in case "${_PREFIX}" in
"${_PKG_PREFIX}"|"${_LOCAL_PREFIX}") ;; "${_PKG_PREFIX}"|"${_LOCAL_PREFIX}") ;;
*) _PATH="${_PATH}:${_PREFIX}/bin:${_PREFIX}/sbin";; *) _PATH="${_PATH}:${_PREFIX}/bin:${_PREFIX}/sbin";;
@ -99,7 +99,7 @@ else
# the last ecmd # the last ecmd
for _e in ebegin eend error errorn einfo einfon ewarn ewarnn ewend \ for _e in ebegin eend error errorn einfo einfon ewarn ewarnn ewend \
vebegin veend veinfo vewarn vewend; do vebegin veend veinfo vewarn vewend; do
eval "${_e}() { local _r; @PREFIX@/lib/rc/bin/${_e} \"\$@\"; _r=$?; \ eval "${_e}() { local _r; @PREFIX@/@LIB@/rc/bin/${_e} \"\$@\"; _r=$?; \
export EINFO_LASTCMD=${_e}; return \$_r; }" export EINFO_LASTCMD=${_e}; return \$_r; }"
done done
unset _e unset _e

View File

@ -8,7 +8,7 @@ retval=0
# the old service state data # the old service state data
if [ "${RC_SVCDIR}" != "/" ] && mkdir "${RC_SVCDIR}/.test.$$" 2>/dev/null; then if [ "${RC_SVCDIR}" != "/" ] && mkdir "${RC_SVCDIR}/.test.$$" 2>/dev/null; then
rmdir "${RC_SVCDIR}/.test.$$" rmdir "${RC_SVCDIR}/.test.$$"
for x in ${RC_SVCDIR:-/lib/rc/init.d}/*; do for x in ${RC_SVCDIR:-/@LIB@/rc/init.d}/*; do
[ -e "${x}" ] || continue [ -e "${x}" ] || continue
case ${x##*/} in case ${x##*/} in
depconfig|deptree|ksoftlevel|rc.log);; depconfig|deptree|ksoftlevel|rc.log);;

View File

@ -4,15 +4,15 @@
has_addon() has_addon()
{ {
[ -e "${RC_LIBDIR}/addons/$1.sh" ] || [ -e /lib/rcscripts/addons/"$1".sh ] [ -e "${RC_LIBDIR}/addons/$1.sh" ] || [ -e /@LIB@/rcscripts/addons/"$1".sh ]
} }
import_addon() import_addon()
{ {
if [ -e "${RC_LIBDIR}/addons/$1.sh" ]; then if [ -e "${RC_LIBDIR}/addons/$1.sh" ]; then
. "${RC_LIBDIR}/addons/$1.sh" . "${RC_LIBDIR}/addons/$1.sh"
elif [ -e /lib/rcscripts/addons/"$1".sh ]; then elif [ -e /@LIB@/rcscripts/addons/"$1".sh ]; then
. /lib/rcscripts/addons/"$1".sh . /@LIB@/rcscripts/addons/"$1".sh
else else
return 1 return 1
fi fi
@ -75,6 +75,6 @@ get_bootparam()
# Add our sbin to $PATH # Add our sbin to $PATH
case "${PATH}" in case "${PATH}" in
@PREFIX@/lib/rc/sbin|@PREFIX@/lib/rc/sbin:*);; "${RC_LIBDIR}"/rc/sbin|"${RC_LIBDIR}"/rc/sbin:*);;
*) export PATH="@PREFIX@/lib/rc/sbin:${PATH}";; *) export PATH="${RC_LIBDIR}/rc/sbin:${PATH}";;
esac esac