summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorPaul Nasrat <pnasrat@googlemail.com>2008-10-11 08:12:22 +0100
committerPaul Nasrat <pnasrat@googlemail.com>2008-10-11 08:12:22 +0100
commit157c0ddff032bb78838a1448eb1ff989bf1da705 (patch)
treed7c5b006f49814fc4b6c9506cf872eb2c8506cca /lib/puppet
parent65eafb7c01e6b4c003066cf7c6dceb5910e91950 (diff)
downloadpuppet-157c0ddff032bb78838a1448eb1ff989bf1da705.tar.gz
puppet-157c0ddff032bb78838a1448eb1ff989bf1da705.tar.xz
puppet-157c0ddff032bb78838a1448eb1ff989bf1da705.zip
Fix 1642 (always warning) and improve unit tests to cover when to warn and not
Diffstat (limited to 'lib/puppet')
-rwxr-xr-xlib/puppet/type/file/checksum.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/type/file/checksum.rb b/lib/puppet/type/file/checksum.rb
index 27edee13d..785ed0fee 100755
--- a/lib/puppet/type/file/checksum.rb
+++ b/lib/puppet/type/file/checksum.rb
@@ -53,7 +53,7 @@ Puppet::Type.type(:file).newproperty(:checksum) do
else
if FileTest.directory?(@resource[:path])
return :time
- elsif @resource[:source]
+ elsif @resource[:source] and value.to_s != "md5"
self.warning("Files with source set must use md5 as checksum. Forcing to md5 from %s for %s" % [ value, @resource[:path] ])
return :md5
else