From e493f8acf9fe40baadf4fcd4e1176afa6264d768 Mon Sep 17 00:00:00 2001 From: Max Martin Date: Thu, 7 Apr 2011 16:17:04 -0700 Subject: (#6856) Copy dangling symlinks with 'links => manage' File resource. When copying symlinks with 'links => manage', there is no need to examine the content of the link target, since the link is supposed to be copied as-is. Skip copying this value to the resource from the metadata (source), since the content will be nil in the dangling symlink case. Paired-with: Jacob Helwig --- lib/puppet/type/file/source.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/puppet') diff --git a/lib/puppet/type/file/source.rb b/lib/puppet/type/file/source.rb index 6dda7957c..6ebec51fe 100755 --- a/lib/puppet/type/file/source.rb +++ b/lib/puppet/type/file/source.rb @@ -114,6 +114,7 @@ module Puppet param_name = (metadata_method == :checksum) ? :content : metadata_method next if metadata_method == :owner and !Puppet.features.root? next if metadata_method == :checksum and metadata.ftype == "directory" + next if metadata_method == :checksum and metadata.ftype == "link" and metadata.links == :manage if resource[param_name].nil? or resource[param_name] == :absent resource[param_name] = metadata.send(metadata_method) -- cgit