diff options
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/type/file.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb index 8a21aa3f7..5b41538fd 100644 --- a/lib/puppet/type/file.rb +++ b/lib/puppet/type/file.rb @@ -744,7 +744,7 @@ Puppet::Type.newtype(:file) do # And put our new file in place if use_temporary_file # This is only not true when our file is empty. begin - fail_if_checksum_is_wrong(path, content) if validate + fail_if_checksum_is_wrong(path, content) if validate_checksum? File.rename(path, self[:path]) rescue => detail fail "Could not rename temporary file %s to %s : %s" % [path, self[:path], detail] @@ -761,6 +761,10 @@ Puppet::Type.newtype(:file) do private + def validate_checksum? + false + end + # Make sure the file we wrote out is what we think it is. def fail_if_checksum_is_wrong(path, checksum) # Use the appropriate checksum type -- md5, md5lite, etc. |