diff options
author | Nigel Kersten <nigelk@google.com> | 2008-12-04 13:07:02 -0800 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2008-12-06 12:10:36 +1100 |
commit | ed49153c28a640c941fb9e1d70f196a454ecf151 (patch) | |
tree | ceae0399d01f68c1e76a22445992e9b95d67169e /lib | |
parent | 05e05bb70a2eb6b57b59340c15f4c205a4803b3e (diff) | |
download | puppet-ed49153c28a640c941fb9e1d70f196a454ecf151.tar.gz puppet-ed49153c28a640c941fb9e1d70f196a454ecf151.tar.xz puppet-ed49153c28a640c941fb9e1d70f196a454ecf151.zip |
new better way of doing stdin
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/provider/macauthorization/macauthorization.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/puppet/provider/macauthorization/macauthorization.rb b/lib/puppet/provider/macauthorization/macauthorization.rb index 9d4886e90..8d20f0819 100644 --- a/lib/puppet/provider/macauthorization/macauthorization.rb +++ b/lib/puppet/provider/macauthorization/macauthorization.rb @@ -100,6 +100,7 @@ Puppet::Type.type(:macauthorization).provide :macauthorization, :parent => Puppe # take the current values, merge the specified values to obtain a complete # description of the new values. new_values = current_values.merge(specified_values) + Puppet.notice "new values: #{new_values}" # the security binary only allows for writes using stdin, so we dump this # to a tempfile. @@ -107,9 +108,9 @@ Puppet::Type.type(:macauthorization).provide :macauthorization, :parent => Puppe begin tmp.flush Plist::Emit.save_plist(new_values, tmp.path) - tmp.flush + # tmp.flush cmds = [] << :security << "authorizationdb" << "write" << resource[:name] - output = execute(cmds, :combine => false, :stdin => tmp.path) + output = execute(cmds, :stdinfile => tmp.path.to_s) ensure tmp.close tmp.unlink |