summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2011-02-10 17:21:48 -0600
committerWilliam Hubbs <williamh@gentoo.org>2011-02-10 17:21:48 -0600
commit0789dc47c7dc3d5b971abd2eb8644e0a5772cfb8 (patch)
tree6c71a5467722bbeef948ade39b8fdc34ac5d5c5f
parentMigrate BRLTTY to depend block, another good example for simple calls. (diff)
downloadlivecd-tools-0789dc47c7dc3d5b971abd2eb8644e0a5772cfb8.tar.gz
livecd-tools-0789dc47c7dc3d5b971abd2eb8644e0a5772cfb8.tar.bz2
livecd-tools-0789dc47c7dc3d5b971abd2eb8644e0a5772cfb8.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 68b2201..0f5ea58 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