aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorSebastien Luttringer <seblu@seblu.net>2011-04-01 18:43:40 +0200
committerSebastien Luttringer <seblu@seblu.net>2011-04-15 16:29:36 +0200
commit95c20bbe2252bca6ea0d929f2930cd9cbe9f84bf (patch)
treeba7280123a654c5b7646b69e74be42eaeab9ac47 /functions
parent98b4e5c9e30327bb3acc595bbfd3f5e2d967be80 (diff)
downloadinitscripts-95c20bbe2252bca6ea0d929f2930cd9cbe9f84bf.tar.xz
Fix incomplete daemon detection in have_daemon
A daemon is an executable _file_ in /etc/rc.d. Directory like functions.d is not a daemon. Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
Diffstat (limited to 'functions')
-rw-r--r--functions3
1 files changed, 2 insertions, 1 deletions
diff --git a/functions b/functions
index e4d46d0..2c3a6d5 100644
--- a/functions
+++ b/functions
@@ -170,8 +170,9 @@ ck_daemon() {
[[ ! -f /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() {