From d833c3e82826582e40d38c14c1900db3d997b44e Mon Sep 17 00:00:00 2001 From: luke Date: Tue, 27 Feb 2007 17:11:32 +0000 Subject: 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 --- lib/puppet/type/pfile/content.rb | 8 +++++++- 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 -- cgit