diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-02-27 17:11:32 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-02-27 17:11:32 +0000 |
commit | d833c3e82826582e40d38c14c1900db3d997b44e (patch) | |
tree | 2daa9f1ad5da325e64936d9fca0b96b59477b110 /lib/puppet | |
parent | 789b786d24ab83e963b802b81c6f8254c4b4e08c (diff) | |
download | puppet-d833c3e82826582e40d38c14c1900db3d997b44e.tar.gz puppet-d833c3e82826582e40d38c14c1900db3d997b44e.tar.xz puppet-d833c3e82826582e40d38c14c1900db3d997b44e.zip |
Changing the log messages for source and content properties to mention the md5 sum of the new content
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2228 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
-rwxr-xr-x | lib/puppet/type/pfile/content.rb | 8 | ||||
-rwxr-xr-x | lib/puppet/type/pfile/source.rb | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/puppet/type/pfile/content.rb b/lib/puppet/type/pfile/content.rb index 48bf95537..20ad5d6a2 100755 --- a/lib/puppet/type/pfile/content.rb +++ b/lib/puppet/type/pfile/content.rb @@ -21,7 +21,13 @@ module Puppet [templating](/trac/puppet/wiki/PuppetTemplating)." def change_to_s - "synced" + should = "{md5}" + Digest::MD5.hexdigest(self.should) + if @is == :absent + return "created file with contents %s" % should + else + is = "{md5}" + Digest::MD5.hexdigest(@is) + return "changed file contents from %s to %s" % [is, should] + end end # We should probably take advantage of existing md5 sums if they're there, diff --git a/lib/puppet/type/pfile/source.rb b/lib/puppet/type/pfile/source.rb index 8416107a2..4622e966d 100755 --- a/lib/puppet/type/pfile/source.rb +++ b/lib/puppet/type/pfile/source.rb @@ -68,7 +68,7 @@ module Puppet end def change_to_s - "replacing from source %s" % @source + return "replacing from source %s with contents %s" % [@source, @stats[:checksum]] end def checksum |