ports/sysutils/puppet-devel/files/patch-old_rcd_support
Martin Wilke dd683ddda4 - Update to 0.22.3
- 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)
2007-04-17 19:41:20 +00:00

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