Greetings!
Please review the pull request #165: make the debian service provider handle services that dont provide the th opened by (xaque208)
Some more information about the pull request:
- Opened: Tue Oct 11 18:51:20 UTC 2011
- Based on: puppetlabs:master (941e7945925f59e33dab2a09be505ea43ae8b3f2)
- Requested merge: xaque208:7296 (ed4b3349477c5165ec7b223d1b119363592a2581)
Description:
make the debian service provider handle services that dont provide the the query methods as specified in http://www.debian.org/doc/debian-policy/ch-opersys.html
Thanks!
The Pull Request Bot
Diff follows:
diff --git a/lib/puppet/provider/service/debian.rb b/lib/puppet/provider/service/debian.rb
index 58b808a..1179269 100755
--- a/lib/puppet/provider/service/debian.rb
+++ b/lib/puppet/provider/service/debian.rb
@@ -40,6 +40,13 @@ Puppet::Type.type(:service).provide :debian, :parent => :init do
# See x-man-page://invoke-rc.d
if [104, 106].include?($CHILD_STATUS.exitstatus)
return :true
+ elsif [105].include?($CHILD_STATUS.exitstatus)
+ # 105 is unknown, which generally means the the iniscript does not support query
+ if `/bin/ls -1 /etc/rc*.d/S*#{@resource[:name]} 2>/dev/null| wc -l`.to_i >= 4
+ return :true
+ else
+ return :false
+ end
else
return :false
end
-- You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
