From 7ceb437c8f8f545484ebc1236c714f685d5eb7c0 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Sat, 14 Feb 2009 18:03:57 -0600 Subject: Only using the checksum cache when we're using a host_config catalog Only host-configs actually load and store the state file, so any attempt to use that state will just result in lots of "initializing" and "creating" messages. Signed-off-by: Luke Kanies --- lib/puppet/type/file/checksum.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/puppet/type/file/checksum.rb b/lib/puppet/type/file/checksum.rb index 82fae748c..7915c3888 100755 --- a/lib/puppet/type/file/checksum.rb +++ b/lib/puppet/type/file/checksum.rb @@ -69,6 +69,7 @@ Puppet::Type.type(:file).newproperty(:checksum) do # Store the checksum in the data cache, or retrieve it if only the # sum type is provided. def cache(type, sum = nil) + return unless resource.catalog.host_config? unless type raise ArgumentError, "A type must be specified to cache a checksum" end @@ -261,6 +262,7 @@ Puppet::Type.type(:file).newproperty(:checksum) do # Store the new sum to the state db. def updatesum(newvalue) + return unless resource.catalog.host_config? result = false # if we're replacing, vs. updating -- cgit