summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-02-14 18:03:57 -0600
committerLuke Kanies <luke@madstop.com>2009-02-18 22:38:43 -0600
commit7ceb437c8f8f545484ebc1236c714f685d5eb7c0 (patch)
treeb3115eca72a3ff3675a572c0a054165d630b2e97
parent5fd182dc1ce1e5e8dd0eba83d7514e9950aca8a0 (diff)
downloadpuppet-7ceb437c8f8f545484ebc1236c714f685d5eb7c0.tar.gz
puppet-7ceb437c8f8f545484ebc1236c714f685d5eb7c0.tar.xz
puppet-7ceb437c8f8f545484ebc1236c714f685d5eb7c0.zip
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 <luke@madstop.com>
-rwxr-xr-xlib/puppet/type/file/checksum.rb2
1 files changed, 2 insertions, 0 deletions
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