From 7fd5b6f91c207efe26a4d296a03be82ec2cdb03d Mon Sep 17 00:00:00 2001 From: luke Date: Sun, 3 Sep 2006 02:03:38 +0000 Subject: Specifying true/false allowed values for file[:replace]. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1537 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet/type/pfile.rb | 10 +++++++++- lib/puppet/type/pfile/source.rb | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/puppet/type/pfile.rb b/lib/puppet/type/pfile.rb index 3dd201baa..ab990d67b 100644 --- a/lib/puppet/type/pfile.rb +++ b/lib/puppet/type/pfile.rb @@ -117,7 +117,15 @@ module Puppet desc "Whether or not to replace a file that is sourced but exists. This is useful for using file sources purely for initialization." - defaultto true + newvalues(:true, :false) + defaultto :true + end + + newparam(:force) do + desc "Force the file operation. Currently only used when replacing + directories with links." + newvalues(:true, :false) + defaultto false end newparam(:ignore) do diff --git a/lib/puppet/type/pfile/source.rb b/lib/puppet/type/pfile/source.rb index 1d00f7a3d..744d66f34 100755 --- a/lib/puppet/type/pfile/source.rb +++ b/lib/puppet/type/pfile/source.rb @@ -135,7 +135,7 @@ module Puppet # if replace => false then fake the checksum so that the file # is not overwritten. unless @is == :absent - unless @parent[:replace] + if @parent[:replace] == :false info "Not replacing existing file" @is = @stats[:checksum] end -- cgit