[arch-projects] [INITSCRIPTS][PATCH 2/3] Fix incomplete daemon detection in have_daemon
Sebastien Luttringer
seblu at seblu.net
Sat Apr 2 11:52:55 EDT 2011
A daemon is an executable _file_ in /etc/rc.d.
Directory like functions.d is not a daemon.
Signed-off-by: Sebastien Luttringer <seblu at seblu.net>
---
functions | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/functions b/functions
index 090f099..8a191e6 100644
--- a/functions
+++ b/functions
@@ -170,8 +170,9 @@ ck_daemon() {
[[ ! -f /var/run/daemons/$1 ]]
}
+# Check if $1 is a valid daemon name
have_daemon() {
- [[ -x /etc/rc.d/$1 ]]
+ [[ -f /etc/rc.d/$1 && -x /etc/rc.d/$1 ]]
}
start_daemon() {
--
Sebastien Seblu Luttringer
More information about the arch-projects
mailing list