2 Apr
2011
2 Apr
'11
3:52 p.m.
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> --- 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