Skip to content
Snippets Groups Projects
Commit f31dd20f authored by Pär Lindfors's avatar Pär Lindfors Committed by Thomas Bellman
Browse files

store_versioned_data(): Create linkpath as a symlink.


Puppet bug 2817 ("File resource with links=>follow creates a symlink")
was fixed six years ago, so the workaround for it, using hardlinks, is
no longer needed.

Signed-off-by: default avatarThomas Bellman <bellman@nsc.liu.se>
parent 3a86b8d9
No related branches found
No related tags found
No related merge requests found
...@@ -20,9 +20,7 @@ module Puppet::Parser::Functions ...@@ -20,9 +20,7 @@ module Puppet::Parser::Functions
Path where the data will be available. This will be a link to the Path where the data will be available. This will be a link to the
real file where the data is stored (see the target parameter). It real file where the data is stored (see the target parameter). It
is through this path that store_versioned_data checks to see if the is through this path that store_versioned_data checks to see if the
data has changed since last time. Currently this is a hard-link, data has changed since last time.
but it will be changed to use a symbolic link when Puppet bug 2817
is fixed.
:target: :target:
Path, relative to linkpath, where the data will actually be stored. Path, relative to linkpath, where the data will actually be stored.
...@@ -53,11 +51,6 @@ module Puppet::Parser::Functions ...@@ -53,11 +51,6 @@ module Puppet::Parser::Functions
fp.write(data) fp.write(data)
fp.close fp.close
File.rename(temppath, newpath) File.rename(temppath, newpath)
# We would actually want a symlink, but a bug in Puppet 0.25.1 FileUtils.ln_s(newname, linkpath, :force=>true)
# makes it follow links even if we ask it not to. Workaround
# is to use a hard link.
# See <http://projects.reductivelabs.com/issues/2817>.
##FileUtils.ln_s(newname, linkpath, :force=>true)
FileUtils.ln(newpath, linkpath, :force=>true)
end end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment