summaryrefslogtreecommitdiffstats
path: root/lib/puppet/file_serving/fileset.rb
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2010-03-13 14:57:39 +0100
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commit9122ac51284086a050d61df8fe060616aaf83d3c (patch)
treed626cf2fd4535965d58648919c889c7228685b0e /lib/puppet/file_serving/fileset.rb
parent73c8d0d4701f10995c81633b912bc6dc65a2cf78 (diff)
downloadpuppet-9122ac51284086a050d61df8fe060616aaf83d3c.tar.gz
puppet-9122ac51284086a050d61df8fe060616aaf83d3c.tar.xz
puppet-9122ac51284086a050d61df8fe060616aaf83d3c.zip
Fix #2929 - Allow checksum to be "none"
File checksum is "md5" by default. When managing local files (not sourced or content) it might be desirable to not checksum files, especially when managing deep hierarchies containing many files. This patch allows to write such manifests: file { "/path/to/deep/hierarchy": owner => brice, recurse => true, checksum => none } Then puppet(d) won't checksum those files, just manage their ownership. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'lib/puppet/file_serving/fileset.rb')
-rw-r--r--lib/puppet/file_serving/fileset.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/file_serving/fileset.rb b/lib/puppet/file_serving/fileset.rb
index 50e4e1e80..a66d9356f 100644
--- a/lib/puppet/file_serving/fileset.rb
+++ b/lib/puppet/file_serving/fileset.rb
@@ -9,7 +9,7 @@ require 'puppet/file_serving/metadata'
# Operate recursively on a path, returning a set of file paths.
class Puppet::FileServing::Fileset
attr_reader :path, :ignore, :links
- attr_accessor :recurse, :recurselimit
+ attr_accessor :recurse, :recurselimit, :checksum_type
# Produce a hash of files, with merged so that earlier files
# with the same postfix win. E.g., /dir1/subfile beats /dir2/subfile.
@@ -105,7 +105,7 @@ class Puppet::FileServing::Fileset
end
def initialize_from_request(request)
- [:links, :ignore, :recurse, :recurselimit].each do |param|
+ [:links, :ignore, :recurse, :recurselimit, :checksum_type].each do |param|
if request.options.include?(param) # use 'include?' so the values can be false
value = request.options[param]
elsif request.options.include?(param.to_s)