From 28d7a19201d52e61112c90beee1511f09c036bd8 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 2 Jan 2008 15:42:52 +0000 Subject: Allow rc_$service_$deptype in rc.conf --- sh/gendepends.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sh') diff --git a/sh/gendepends.sh b/sh/gendepends.sh index a2b2181a..662d3972 100755 --- a/sh/gendepends.sh +++ b/sh/gendepends.sh @@ -76,18 +76,18 @@ for _dir in /etc/init.d /usr/local/etc/init.d; do [ -e "${_dir}/../conf.d/${SVCNAME}" ] && . "${_dir}/../conf.d/${SVCNAME}" + [ -e /etc/rc.conf ] && . /etc/rc.conf + if . "${_dir}/${SVCNAME}"; then echo "${SVCNAME}" >&3 depend # Add any user defined depends - config ${rc_config} ${RC_CONFIG} - need ${rc_need} ${RC_NEED} - use ${rc_use} ${RC_USE} - before ${rc_before} ${RC_BEFORE} - after ${rc_after} ${RC_AFTER} - provide ${rc_provide} ${RC_PROVIDE} - keywords ${rc_keywords} ${RC_KEYWORDS} + for _deptype in config need use after before provide keywords; do + eval _depends=\$rc_$(shell_var "${SVCNAME}")_${_deptype} + [ -z "${_depends}" ] && eval _depends=\$rc_${_deptype} + ${_deptype} ${_depends} + done fi ) done -- cgit v1.2.3