mirror of
https://git.freebsd.org/ports.git
synced 2025-06-23 05:30:31 -04:00
- Fix invalid variable and typos in rc.d script - add a patch which fixes external command to hang PR: 111764 Submitted by: Tomoyuki Sakurai <cherry@trombik.org> (maintainer)
25 lines
904 B
Text
25 lines
904 B
Text
Support both /etc/rc.d/daemon and /etc/rc.d/daemon.sh
|
|
http://reductivelabs.com/trac/puppet/ticket/572
|
|
|
|
--- lib/puppet/provider/service/init.rb.orig Mon Apr 2 17:52:00 2007
|
|
+++ lib/puppet/provider/service/init.rb Mon Apr 2 18:01:50 2007
|
|
@@ -114,6 +114,19 @@
|
|
# 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
|
|
|