summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rwxr-xr-xlib/puppet/server/fileserver.rb5
-rw-r--r--lib/puppet/type/pfile.rb2
-rwxr-xr-xlib/puppet/type/pfile/checksum.rb10
3 files changed, 10 insertions, 7 deletions
diff --git a/lib/puppet/server/fileserver.rb b/lib/puppet/server/fileserver.rb
index c0d1303fa..ef35365a8 100755
--- a/lib/puppet/server/fileserver.rb
+++ b/lib/puppet/server/fileserver.rb
@@ -60,11 +60,6 @@ class Server
return ""
end
- #if links == :ignore and obj[:type] == "link"
- # mount.info "Ignoring link %s" % obj.name
- # return ""
- #end
-
desc = []
CHECKPARAMS.each { |check|
if state = obj.state(check)
diff --git a/lib/puppet/type/pfile.rb b/lib/puppet/type/pfile.rb
index 08f003f8c..1ea3473d9 100644
--- a/lib/puppet/type/pfile.rb
+++ b/lib/puppet/type/pfile.rb
@@ -833,6 +833,8 @@ module Puppet
end
# And then update our checksum, so the next run doesn't find it.
+ # FIXME This is extra work, because it's going to read the whole
+ # file back in again.
self.setchecksum
end
end # Puppet.type(:pfile)
diff --git a/lib/puppet/type/pfile/checksum.rb b/lib/puppet/type/pfile/checksum.rb
index e43bb3d74..02e2e5761 100755
--- a/lib/puppet/type/pfile/checksum.rb
+++ b/lib/puppet/type/pfile/checksum.rb
@@ -138,11 +138,17 @@ module Puppet
begin
File.open(@parent[:path]) { |file|
text = nil
- if checktype == "md5"
+ case checktype
+ when :md5
text = file.read
- else
+ Puppet.info "Reading all of %s with %s" %
+ [@parent.name, checktype.inspect]
+ when :md5lite
+ Puppet.info "Reading a small part of %s with %s" %
+ [@parent.name, checktype.inspect]
text = file.read(512)
end
+
if text.nil?
self.debug "Not checksumming empty file %s" %
@parent[:path]