From ed49153c28a640c941fb9e1d70f196a454ecf151 Mon Sep 17 00:00:00 2001 From: Nigel Kersten Date: Thu, 4 Dec 2008 13:07:02 -0800 Subject: new better way of doing stdin --- lib/puppet/provider/macauthorization/macauthorization.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') 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 -- cgit