summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-09-03 02:03:38 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-09-03 02:03:38 +0000
commit7fd5b6f91c207efe26a4d296a03be82ec2cdb03d (patch)
tree3c990c3b9c309dcd9113ab31e9a519d6d2fdf194 /lib
parent8cbe1d32377cef0761441baaba03695655275710 (diff)
downloadpuppet-7fd5b6f91c207efe26a4d296a03be82ec2cdb03d.tar.gz
puppet-7fd5b6f91c207efe26a4d296a03be82ec2cdb03d.tar.xz
puppet-7fd5b6f91c207efe26a4d296a03be82ec2cdb03d.zip
Specifying true/false allowed values for file[:replace].
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1537 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/type/pfile.rb10
-rwxr-xr-xlib/puppet/type/pfile/source.rb2
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