aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-05-03 08:08:59 +0000
committerRoy Marples <roy@marples.name>2007-05-03 08:08:59 +0000
commitb4a3796b018d44ff9beecb8903ed1996a4f4a9f5 (patch)
tree37e9b203bb126e0d95d474d9b06f0a0e16e9ae46 /sh
parent5227cb203aad97ebef57c8867147008298fdc3b6 (diff)
Load the config file before the init script to stop badly coded init scripts from erroring, #176548
Diffstat (limited to 'sh')
-rwxr-xr-xsh/gendepends.sh15
1 files 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##*/}
(
+ 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}" >&2
+
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
-
- [ -e /etc/conf.d/"${SVCNAME}" ] && . /etc/conf.d/"${SVCNAME}"
echo "${SVCNAME}"
depend