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=
for p in ${PATH}; do
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);;
@LOCAL_PREFIX@/bin|@LOCAL_PREFIX@/sbin);;
*) path="${path}${path:+:}${p}";;
@ -66,7 +66,7 @@ _PREFIX=@PREFIX@
_PKG_PREFIX=@PKG_PREFIX@
_LOCAL_PREFIX=@LOCAL_PREFIX@
_LOCAL_PREFIX=${_LOCAL_PREFIX:-/usr/local}
_PATH=@PREFIX@/lib/rc/bin
_PATH=@PREFIX@/@LIB@/rc/bin
case "${_PREFIX}" in
"${_PKG_PREFIX}"|"${_LOCAL_PREFIX}") ;;
*) _PATH="${_PATH}:${_PREFIX}/bin:${_PREFIX}/sbin";;
@ -99,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; @PREFIX@/lib/rc/bin/${_e} \"\$@\"; _r=$?; \
eval "${_e}() { local _r; @PREFIX@/@LIB@/rc/bin/${_e} \"\$@\"; _r=$?; \
export EINFO_LASTCMD=${_e}; return \$_r; }"
done
unset _e

View File

@ -8,7 +8,7 @@ retval=0
# the old service state data
if [ "${RC_SVCDIR}" != "/" ] && mkdir "${RC_SVCDIR}/.test.$$" 2>/dev/null; then
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
case ${x##*/} in
depconfig|deptree|ksoftlevel|rc.log);;

View File

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