summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-05-04 17:05:59 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-05-04 17:05:59 +0000
commit7b7ac1846b729114d2e33cee9daa7f7a19739a3f (patch)
treed052d480370a334e3ffd5860ee3f29b43ddbfc17
parentf0aeaec36a4ec5b3def9c7ca0e777b402c67faa1 (diff)
downloadpuppet-7b7ac1846b729114d2e33cee9daa7f7a19739a3f.tar.gz
puppet-7b7ac1846b729114d2e33cee9daa7f7a19739a3f.tar.xz
puppet-7b7ac1846b729114d2e33cee9daa7f7a19739a3f.zip
Changing default for pattern to include the binary if it is included
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1176 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r--lib/puppet/type/service.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/type/service.rb b/lib/puppet/type/service.rb
index fffae4ebe..14656d5d7 100644
--- a/lib/puppet/type/service.rb
+++ b/lib/puppet/type/service.rb
@@ -244,7 +244,10 @@ module Puppet
of a service, then the service name will be used instead.
The pattern can be a simple string or any legal Ruby pattern."
- defaultto { @parent[:name] }
+
+ defaultto {
+ @parent[:binary] || @parent[:name]
+ }
end
newparam(:restart) do
desc "Specify a *restart* command manually. If left
@@ -522,6 +525,7 @@ module Puppet
return :stopped
end
elsif pid = self.getpid
+ self.debug "PID is %s" % pid
return :running
else
return :stopped