Cater for einfo calls inside the depend function

This commit is contained in:
Roy Marples 2007-07-22 11:23:56 +00:00
parent b67f71ca5d
commit 52664d77f9

View File

@ -6,19 +6,29 @@
. /etc/init.d/functions.sh . /etc/init.d/functions.sh
need() { need() {
exec 1>&3
[ -n "$*" ] && echo "${SVCNAME} ineed $*" [ -n "$*" ] && echo "${SVCNAME} ineed $*"
exec 1>&2
} }
use() { use() {
exec 1>&3
[ -n "$*" ] && echo "${SVCNAME} iuse $*" [ -n "$*" ] && echo "${SVCNAME} iuse $*"
exec 1>&2
} }
before() { before() {
exec 1>&3
[ -n "$*" ] && echo "${SVCNAME} ibefore $*" [ -n "$*" ] && echo "${SVCNAME} ibefore $*"
exec 1>&2
} }
after() { after() {
exec 1>&3
[ -n "$*" ] && echo "${SVCNAME} iafter $*" [ -n "$*" ] && echo "${SVCNAME} iafter $*"
exec 1>&2
} }
provide() { provide() {
exec 1>&3
[ -n "$*" ] && echo "${SVCNAME} iprovide $*" [ -n "$*" ] && echo "${SVCNAME} iprovide $*"
exec 1>&2
} }
depend() { depend() {
: :
@ -45,10 +55,10 @@ for SVCNAME in * ; do
[ -e /etc/conf.d/"${SVCNAME}" ] && . /etc/conf.d/"${SVCNAME}" >&2 [ -e /etc/conf.d/"${SVCNAME}" ] && . /etc/conf.d/"${SVCNAME}" >&2
if . /etc/init.d/"${SVCNAME}" ; then if . /etc/init.d/"${SVCNAME}" ; then
# Restore stdout now
exec 1>&3 exec 1>&3
echo "${SVCNAME}" echo "${SVCNAME}"
exec 1>&2
depend depend
# Add any user defined depends # Add any user defined depends