diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-06-18 21:26:04 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-06-18 21:26:04 +0000 |
| commit | 0b1dbbb870cde50eb39005098ed02979ee217f77 (patch) | |
| tree | 54f0c880926a9bfcaf04bf13397ba3790c2ab853 /lib | |
| parent | 611e783594149696073324f4108b2eea72416d58 (diff) | |
| download | puppet-0b1dbbb870cde50eb39005098ed02979ee217f77.tar.gz puppet-0b1dbbb870cde50eb39005098ed02979ee217f77.tar.xz puppet-0b1dbbb870cde50eb39005098ed02979ee217f77.zip | |
Applying patch in #572 by trombik
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2619 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
| -rwxr-xr-x | lib/puppet/provider/service/init.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/puppet/provider/service/init.rb b/lib/puppet/provider/service/init.rb index 79e5a2c69..51a77a157 100755 --- a/lib/puppet/provider/service/init.rb +++ b/lib/puppet/provider/service/init.rb @@ -108,6 +108,19 @@ Puppet::Type.type(:service).provide :init, :parent => :base do # if we've gotten this far, we found a valid script return fqname } + @model[:path].each { |path| + fqname_sh = File.join(path,"#{name}.sh") + begin + stat = File.stat(fqname_sh) + rescue + # should probably rescue specific errors... + self.debug("Could not find %s.sh in %s" % [name,path]) + next + end + + # if we've gotten this far, we found a valid script + return fqname_sh + } raise Puppet::Error, "Could not find init script for '%s'" % name end |
