aboutsummaryrefslogtreecommitdiff
path: root/sh/gendepends.sh.in
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-04-16 23:23:21 +0000
committerRoy Marples <roy@marples.name>2009-04-16 23:23:21 +0000
commitace0b9653b44582fdf24381acd23bc23ccbb3f93 (patch)
treee7820864bbe5018eaa9200410e6d30c2250985b0 /sh/gendepends.sh.in
parent966ecb24da9cce156a68bf0edda9e00aeaa4b58c (diff)
Avoid needless forking, #165
Thanks to Natanael Copa.
Diffstat (limited to 'sh/gendepends.sh.in')
-rw-r--r--sh/gendepends.sh.in5
1 files 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}