diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/type/pfile.rb | 10 | ||||
-rw-r--r-- | lib/puppet/type/pfile/target.rb | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/puppet/type/pfile.rb b/lib/puppet/type/pfile.rb index d92a1e03d..22e7073c8 100644 --- a/lib/puppet/type/pfile.rb +++ b/lib/puppet/type/pfile.rb @@ -8,6 +8,7 @@ require 'puppet/network/server/fileserver' module Puppet newtype(:file) do + include Puppet::Util::MethodHelper @doc = "Manages local files, including setting ownership and permissions, creation of both files and directories, and retrieving entire files from remote servers. As Puppet matures, it @@ -564,7 +565,14 @@ module Puppet # object. def newchild(path, local, hash = {}) # make local copy of arguments - args = @arghash.dup + args = symbolize_options(@arghash) + + # There's probably a better way to do this, but we don't want + # to pass this info on. + if v = args[:ensure] + v = symbolize(v) + args.delete(:ensure) + end if path =~ %r{^#{File::SEPARATOR}} self.devfail( diff --git a/lib/puppet/type/pfile/target.rb b/lib/puppet/type/pfile/target.rb index 3de74bb74..12e8ea732 100644 --- a/lib/puppet/type/pfile/target.rb +++ b/lib/puppet/type/pfile/target.rb @@ -44,7 +44,7 @@ module Puppet end def insync? - if [:nochange, :notlink].include?(self.should) or @parent.should(:ensure) != :link + if [:nochange, :notlink].include?(self.should) return true else return super |