summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorlutter <lutter@980ebf18-57e1-0310-9a29-db15c13687c0>2006-12-14 22:56:33 +0000
committerlutter <lutter@980ebf18-57e1-0310-9a29-db15c13687c0>2006-12-14 22:56:33 +0000
commit8be0d33b4a48c2fe32a3d3e67f426586b1d88811 (patch)
tree4524a8b40795783608e1bcaff148239060373076 /lib
parent29ded0199011a34547dd7acc231f662757e681d1 (diff)
downloadpuppet-8be0d33b4a48c2fe32a3d3e67f426586b1d88811.tar.gz
puppet-8be0d33b4a48c2fe32a3d3e67f426586b1d88811.tar.xz
puppet-8be0d33b4a48c2fe32a3d3e67f426586b1d88811.zip
Fix service.list, in particular for the redhat provider
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1923 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rwxr-xr-xlib/puppet/provider/service/redhat.rb8
-rw-r--r--lib/puppet/type/service.rb9
2 files changed, 12 insertions, 5 deletions
diff --git a/lib/puppet/provider/service/redhat.rb b/lib/puppet/provider/service/redhat.rb
index 45db9f193..64983e1dd 100755
--- a/lib/puppet/provider/service/redhat.rb
+++ b/lib/puppet/provider/service/redhat.rb
@@ -8,6 +8,14 @@ Puppet::Type.type(:service).provide :redhat, :parent => :init do
defaultfor :operatingsystem => [:redhat, :fedora, :suse]
+ def self.defpath
+ superclass.defpath
+ end
+
+ if self.suitable?
+ Puppet.type(:service).newpath(:redhat, defpath())
+ end
+
# Remove the symlinks
def disable
begin
diff --git a/lib/puppet/type/service.rb b/lib/puppet/type/service.rb
index 734bff50f..c8726e4da 100644
--- a/lib/puppet/type/service.rb
+++ b/lib/puppet/type/service.rb
@@ -298,14 +298,13 @@ module Puppet
# List all available services
def self.list
- # First see if the default service type can list services for us
- deftype = svctype(defaulttype())
+ defprov = defaultprovider
names = []
- if deftype.respond_to? :list
- deftype.list(deftype.name)
+ if defprov.respond_to? :list
+ defprov.list(defprov.name)
else
- Puppet.debug "Type %s does not respond to list" % deftype.name
+ Puppet.debug "Type %s does not respond to list" % defprov.name
end
self.collect { |s| s }