Load the config file before the init script to stop badly coded init scripts from erroring, #176548

This commit is contained in:
Roy Marples 2007-05-03 08:08:59 +00:00
parent 5227cb203a
commit b4a3796b01

View File

@ -33,14 +33,15 @@ for SVCNAME in * ; do
SVCNAME=${SVCNAME##*/}
(
if . /etc/init.d/"${SVCNAME}" ; then
rc_c=${SVCNAME%%.*}
if [ -n "${rc_c}" -a "${rc_c}" != "${SVCNAME}" ] ; then
[ -e /etc/conf.d/"${rc_c}" ] && . /etc/conf.d/"${rc_c}"
fi
unset rc_c
rc_c=${SVCNAME%%.*}
if [ -n "${rc_c}" -a "${rc_c}" != "${SVCNAME}" ] ; then
[ -e /etc/conf.d/"${rc_c}" ] && . /etc/conf.d/"${rc_c}" >&2
fi
unset rc_c
[ -e /etc/conf.d/"${SVCNAME}" ] && . /etc/conf.d/"${SVCNAME}"
[ -e /etc/conf.d/"${SVCNAME}" ] && . /etc/conf.d/"${SVCNAME}" >&2
if . /etc/init.d/"${SVCNAME}" ; then
echo "${SVCNAME}"
depend