1 |
commit: 66f19c49e11110cbe6c8d13aebd7b66cf3b85dcc |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 10 23:21:48 2011 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 1 02:42:36 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=66f19c49 |
7 |
|
8 |
check_svc should use yesno and rc-service |
9 |
|
10 |
--- |
11 |
autoconfig | 6 +++--- |
12 |
1 files changed, 3 insertions(+), 3 deletions(-) |
13 |
|
14 |
diff --git a/autoconfig b/autoconfig |
15 |
index e9eba0f..cfa8bf6 100755 |
16 |
--- a/autoconfig |
17 |
+++ b/autoconfig |
18 |
@@ -210,12 +210,12 @@ depend() { |
19 |
# Checks whether a service will be started by autoconfig. |
20 |
# Usage: check_svc var service [service_alternative] |
21 |
check_svc() { |
22 |
- if [ "${1}" = "yes" ] |
23 |
+ if yesno "${1}" |
24 |
then |
25 |
- if [ -x "/etc/init.d/${2}" ] |
26 |
+ if rc-service -e "${2}" |
27 |
then |
28 |
echo "${2}" |
29 |
- elif [ -n "${3}" -a -x "/etc/init.d/${3}" ] |
30 |
+ elif [ -n "${3}" ] && rc-service -e ${3}" |
31 |
then |
32 |
echo "${3}" |
33 |
fi |