summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2010-06-23 10:06:16 -0700
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commit45ca669671cc2cf4f2f811bbd48b5283d8fa6c8a (patch)
tree747299d1bfad42fce11e2a7c34cca8bd853e96b3
parentc00285c395647bc19237ec6c60099d11997592bb (diff)
Targeted fix for #3851
Older / user written providers may just return a bare string from their ___cmd functions instead of an array. This forces the command as used to be an array without breaking the cases where they (correctly) do return an array.
-rwxr-xr-xlib/puppet/provider/service/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/provider/service/base.rb b/lib/puppet/provider/service/base.rb
index 0bf2b20ea..183bf33e3 100755
--- a/lib/puppet/provider/service/base.rb
+++ b/lib/puppet/provider/service/base.rb
@@ -141,7 +141,7 @@ Puppet::Type.type(:service).provide :base do
if c = @resource[type]
cmd = [c]
else
- cmd = self.send("%scmd" % type)
+ cmd = [send("#{type}cmd")].flatten
end
return texecute(type, cmd, fof)
end