summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorMarkus Roberts <markus@phage.local>2009-09-01 15:11:05 -0700
committerJames Turnbull <james@lovedthanlost.net>2009-09-05 09:24:28 +1000
commitfb236a00459c375e4f2a94bdd924ed4e7fbd25eb (patch)
tree78049888d1ff086e2ca364a508225a4fc6f6342b /lib/puppet
parentd40b942d14d1da0341fb95835a28e0f7b8d88ab8 (diff)
downloadpuppet-fb236a00459c375e4f2a94bdd924ed4e7fbd25eb.tar.gz
puppet-fb236a00459c375e4f2a94bdd924ed4e7fbd25eb.tar.xz
puppet-fb236a00459c375e4f2a94bdd924ed4e7fbd25eb.zip
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 <markus@phage.local>
Diffstat (limited to 'lib/puppet')
-rwxr-xr-xlib/puppet/provider/service/redhat.rb10
1 files changed, 9 insertions, 1 deletions
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