summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-08-11 17:07:11 -0700
committerNick Lewis <nick@puppetlabs.com>2011-08-11 17:07:11 -0700
commit75786ada2187283f21241a5377908ff3a8b3d694 (patch)
treeb5f1649589c3bab518011c212ca8614bfb552472 /lib/puppet
parentf7e96953b4e297ac1f78a1747e8dc3187c49870b (diff)
parentd7c9c765dbf28df3631e709832c44c343569cb53 (diff)
downloadpuppet-75786ada2187283f21241a5377908ff3a8b3d694.tar.gz
puppet-75786ada2187283f21241a5377908ff3a8b3d694.tar.xz
puppet-75786ada2187283f21241a5377908ff3a8b3d694.zip
Merge pull request #32 from joshcooper/ticket/2.6.x/8740-cannot-manage-files-of-type-socket
Ticket/2.6.x/8740 cannot manage files of type socket
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/application/resource.rb3
-rw-r--r--lib/puppet/type/file.rb4
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/puppet/application/resource.rb b/lib/puppet/application/resource.rb
index f55caa58a..bc4faf5e4 100644
--- a/lib/puppet/application/resource.rb
+++ b/lib/puppet/application/resource.rb
@@ -81,6 +81,9 @@ class Puppet::Application::Resource < Puppet::Application
[ Puppet::Resource.new( type, name, :parameters => params ).save( key ) ]
end
else
+ if type == "file"
+ raise "Listing all file instances is not supported. Please specify a file or directory, e.g. puppet resource file /etc"
+ end
Puppet::Resource.search( key, {} )
end.map(&format).join("\n")
diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb
index 630ebe5de..e91929cf8 100644
--- a/lib/puppet/type/file.rb
+++ b/lib/puppet/type/file.rb
@@ -310,8 +310,8 @@ Puppet::Type.newtype(:file) do
super(path.gsub(/\/+/, '/').sub(/\/$/, ''))
end
- def self.instances(base = '/')
- return self.new(:name => base, :recurse => true, :recurselimit => 1, :audit => :all).recurse_local.values
+ def self.instances
+ return []
end
@depthfirst = false