diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-03-08 19:07:07 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-03-08 19:07:07 +0000 |
commit | 4fa800805dc87a84c2af6281305e6015c44207e9 (patch) | |
tree | 107af8f3caf1f7f768a6d293339e4a8206acd8cc /lib | |
parent | 6ad8998a7edb1027eca7913f2d7bfdf66f81cbf4 (diff) | |
download | puppet-4fa800805dc87a84c2af6281305e6015c44207e9.tar.gz puppet-4fa800805dc87a84c2af6281305e6015c44207e9.tar.xz puppet-4fa800805dc87a84c2af6281305e6015c44207e9.zip |
Fixing a few of the log messages so file content changes always include the md5 sum
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2274 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/puppet/type/pfile/ensure.rb | 8 | ||||
-rwxr-xr-x | lib/puppet/type/pfile/source.rb | 7 |
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/puppet/type/pfile/ensure.rb b/lib/puppet/type/pfile/ensure.rb index 076dfbdcf..bb4b3d27a 100755 --- a/lib/puppet/type/pfile/ensure.rb +++ b/lib/puppet/type/pfile/ensure.rb @@ -108,6 +108,14 @@ module Puppet return :link end + def change_to_s + if property = (@parent.property(:content) || @parent.property(:source)) + return property.change_to_s + else + super + end + end + # Check that we can actually create anything def check basedir = File.dirname(@parent[:path]) diff --git a/lib/puppet/type/pfile/source.rb b/lib/puppet/type/pfile/source.rb index 2d569f2ed..072d2cfe2 100755 --- a/lib/puppet/type/pfile/source.rb +++ b/lib/puppet/type/pfile/source.rb @@ -65,7 +65,12 @@ module Puppet end def change_to_s - return "replacing from source %s with contents %s" % [@source, @stats[:checksum]] + should = "{md5}" + @stats[:checksum] + if @parent.is(:ensure) == :absent + return "creating from source %s with contents %s" % [@source, @stats[:checksum]] + else + return "replacing from source %s with contents %s" % [@source, @stats[:checksum]] + end end def checksum |