diff options
author | William Hubbs <williamh@gentoo.org> | 2011-02-10 17:21:48 -0600 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2011-04-30 21:42:36 -0500 |
commit | 66f19c49e11110cbe6c8d13aebd7b66cf3b85dcc (patch) | |
tree | 550321970e35db0999928d14353b50b0e0432581 | |
parent | Migrate BRLTTY to depend block, another good example for simple calls. (diff) | |
download | livecd-tools-66f19c49e11110cbe6c8d13aebd7b66cf3b85dcc.tar.gz livecd-tools-66f19c49e11110cbe6c8d13aebd7b66cf3b85dcc.tar.bz2 livecd-tools-66f19c49e11110cbe6c8d13aebd7b66cf3b85dcc.zip |
check_svc should use yesno and rc-service
-rwxr-xr-x | autoconfig | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |