Allow rc_$service_$deptype in rc.conf
This commit is contained in:
parent
fadee8e656
commit
28d7a19201
@ -82,3 +82,8 @@ net_fs_list="afs cifs coda davfs fuse gfs ncpfs nfs nfs4 ocfs2 shfs smbfs"
|
|||||||
#rc_after="clock"
|
#rc_after="clock"
|
||||||
#rc_before="local"
|
#rc_before="local"
|
||||||
|
|
||||||
|
# You can also enable the above commands here for each service. Below is an
|
||||||
|
# example for service foo.
|
||||||
|
#rc_foo_config="/etc/foo"
|
||||||
|
#rc_foo_need="openvpn"
|
||||||
|
#rc_foo_after="clock"
|
||||||
|
@ -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 "${_dir}/../conf.d/${SVCNAME}" ] && . "${_dir}/../conf.d/${SVCNAME}"
|
||||||
|
|
||||||
|
[ -e /etc/rc.conf ] && . /etc/rc.conf
|
||||||
|
|
||||||
if . "${_dir}/${SVCNAME}"; then
|
if . "${_dir}/${SVCNAME}"; then
|
||||||
echo "${SVCNAME}" >&3
|
echo "${SVCNAME}" >&3
|
||||||
depend
|
depend
|
||||||
|
|
||||||
# Add any user defined depends
|
# Add any user defined depends
|
||||||
config ${rc_config} ${RC_CONFIG}
|
for _deptype in config need use after before provide keywords; do
|
||||||
need ${rc_need} ${RC_NEED}
|
eval _depends=\$rc_$(shell_var "${SVCNAME}")_${_deptype}
|
||||||
use ${rc_use} ${RC_USE}
|
[ -z "${_depends}" ] && eval _depends=\$rc_${_deptype}
|
||||||
before ${rc_before} ${RC_BEFORE}
|
${_deptype} ${_depends}
|
||||||
after ${rc_after} ${RC_AFTER}
|
done
|
||||||
provide ${rc_provide} ${RC_PROVIDE}
|
|
||||||
keywords ${rc_keywords} ${RC_KEYWORDS}
|
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user