summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2011-02-10 17:21:48 -0600
committerWilliam Hubbs <williamh@gentoo.org>2011-04-30 21:42:36 -0500
commit66f19c49e11110cbe6c8d13aebd7b66cf3b85dcc (patch)
tree550321970e35db0999928d14353b50b0e0432581
parentMigrate BRLTTY to depend block, another good example for simple calls. (diff)
downloadlivecd-tools-66f19c49e11110cbe6c8d13aebd7b66cf3b85dcc.tar.gz
livecd-tools-66f19c49e11110cbe6c8d13aebd7b66cf3b85dcc.tar.bz2
livecd-tools-66f19c49e11110cbe6c8d13aebd7b66cf3b85dcc.zip
check_svc should use yesno and rc-service
-rwxr-xr-xautoconfig6
1 files changed, 3 insertions, 3 deletions
diff --git a/autoconfig b/autoconfig
index e9eba0f..cfa8bf6 100755
--- a/autoconfig
+++ b/autoconfig
@@ -210,12 +210,12 @@ depend() {
# Checks whether a service will be started by autoconfig.
# Usage: check_svc var service [service_alternative]
check_svc() {
- if [ "${1}" = "yes" ]
+ if yesno "${1}"
then
- if [ -x "/etc/init.d/${2}" ]
+ if rc-service -e "${2}"
then
echo "${2}"
- elif [ -n "${3}" -a -x "/etc/init.d/${3}" ]
+ elif [ -n "${3}" ] && rc-service -e ${3}"
then
echo "${3}"
fi