diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-03-30 00:46:38 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-03-30 00:46:38 +0000 |
commit | 1e8e7ee55a11b0fe472e6efb3457cf7ce527cbed (patch) | |
tree | 543703719418f30cfede5415be94c346b70c6a13 /lib | |
parent | 4863012792cbc3039e392069df9806790d591ea1 (diff) | |
download | puppet-1e8e7ee55a11b0fe472e6efb3457cf7ce527cbed.tar.gz puppet-1e8e7ee55a11b0fe472e6efb3457cf7ce527cbed.tar.xz puppet-1e8e7ee55a11b0fe472e6efb3457cf7ce527cbed.zip |
Fixing #567. I overrode the propertychanges method to only return changes if the file exists or if the file has a property that could create the file.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2371 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/type/pfile.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/puppet/type/pfile.rb b/lib/puppet/type/pfile.rb index e9500e07f..966896a04 100644 --- a/lib/puppet/type/pfile.rb +++ b/lib/puppet/type/pfile.rb @@ -1094,6 +1094,25 @@ module Puppet end private + + # Override the parent method, because we don't want to generate changes + # when the file is missing and there is no 'ensure' state. + def propertychanges + unless self.stat + found = false + ([:ensure] + CREATORS).each do |prop| + if @parameters.include?(prop) + found = true + break + end + end + unless found + return [] + end + end + super + end + # There are some cases where all of the work does not get done on # file creation/modification, so we have to do some extra checking. def property_fix |