From b4a3796b018d44ff9beecb8903ed1996a4f4a9f5 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 3 May 2007 08:08:59 +0000 Subject: [PATCH] Load the config file before the init script to stop badly coded init scripts from erroring, #176548 --- sh/gendepends.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sh/gendepends.sh b/sh/gendepends.sh index aa494f03..6c86f2a9 100755 --- a/sh/gendepends.sh +++ b/sh/gendepends.sh @@ -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