From ace0b9653b44582fdf24381acd23bc23ccbb3f93 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 16 Apr 2009 23:23:21 +0000 Subject: [PATCH] Avoid needless forking, #165 Thanks to Natanael Copa. --- sh/gendepends.sh.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sh/gendepends.sh.in b/sh/gendepends.sh.in index 1ae2e6d7..618c5f2d 100644 --- a/sh/gendepends.sh.in +++ b/sh/gendepends.sh.in @@ -83,6 +83,7 @@ do if . "${_dir}/${RC_SVCNAME}"; then echo "${RC_SVCNAME}" >&3 depend + _rc_svcname=$(shell_var "${RC_SVCNAME}") # Add any user defined depends for _deptype in config:CONFIG need:NEED use:USE \ @@ -91,9 +92,9 @@ do IFS=: set -- ${_deptype} unset IFS - eval _depends=\$rc_$(shell_var "${RC_SVCNAME}")_$1 + eval _depends=\$rc_${_rc_svcname}_$1 [ -z "${_depends}" ] && eval _depends=\$rc_$1 - [ -z "${_depends}" ] && eval _depends=\$RC_$(shell_var "${RC_SVCNAME}")_$2 + [ -z "${_depends}" ] && eval _depends=\$RC_${_rc_svcname}_$2 [ -z "${_depends}" ] && eval _depends=\$RC_$2 $1 ${_depends}