From eca6476ceded9c42d17f0bc4238fb834278ffbfb Mon Sep 17 00:00:00 2001 From: Christoph Hartmann Date: Thu, 22 Oct 2015 14:07:29 +0200 Subject: [PATCH] bugfix: use absolute path for SysV service to work well with sudo on CentOS 5 --- lib/resources/service.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/resources/service.rb b/lib/resources/service.rb index 54ab6f24c..d623cd239 100644 --- a/lib/resources/service.rb +++ b/lib/resources/service.rb @@ -204,9 +204,8 @@ class SysV < ServiceManager # check if service is really running # service throws an exit code if the service is not installed or # not enabled - cmd = @vulcano.command("service #{service_name} status") + cmd = @vulcano.command("/sbin/service #{service_name} status") cmd.exit_status == 0 ? (running = true) : (running = false) - { name: service_name, description: nil,