From fb236a00459c375e4f2a94bdd924ed4e7fbd25eb Mon Sep 17 00:00:00 2001 From: Markus Roberts Date: Tue, 1 Sep 2009 15:11:05 -0700 Subject: Combined fix for #2525, #2552 -- RedHat service issues This patch normalizes the structure of the RH service routines which should clear up any lingering issues; xxxcmd routines always return an appropriate array, while the coresponding routines (status/restart/ etc.) either call super or take the needed actions. Signed-off-by: Markus Roberts --- lib/puppet/provider/service/redhat.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/puppet') diff --git a/lib/puppet/provider/service/redhat.rb b/lib/puppet/provider/service/redhat.rb index 5eceedeb0..8c12782d5 100755 --- a/lib/puppet/provider/service/redhat.rb +++ b/lib/puppet/provider/service/redhat.rb @@ -54,7 +54,7 @@ Puppet::Type.type(:service).provide :redhat, :parent => :init do def restart if @resource[:hasrestart] == :true - [command(:service), @resource[:name], "restart"] + service(@resource[:name], "restart") else super end @@ -75,6 +75,14 @@ Puppet::Type.type(:service).provide :redhat, :parent => :init do end end + def statuscmd + [command(:service), @resource[:name], "status"] + end + + def restartcmd + [command(:service), @resource[:name], "restart"] + end + def startcmd [command(:service), @resource[:name], "start"] end -- cgit