summaryrefslogtreecommitdiff
path: root/lib/chef/provider/group/dscl.rb
diff options
context:
space:
mode:
authorkaustubh-d <kaustubh@clogeny.com>2014-11-18 14:56:22 +0530
committerBryan McLellan <btm@opscode.com>2015-02-17 09:16:38 -0500
commit6909f4074dbd9cee5906333f693bd282476a6ac5 (patch)
tree7deb7fcea3b0409b23986f317649f8ec18fa241e /lib/chef/provider/group/dscl.rb
parentaa9b233614da81c506929cc1c36eb509a4e2c97e (diff)
downloadchef-6909f4074dbd9cee5906333f693bd282476a6ac5.tar.gz
fix aix related providers to replace popen4 with mixlib shell_out
Diffstat (limited to 'lib/chef/provider/group/dscl.rb')
-rw-r--r--lib/chef/provider/group/dscl.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/chef/provider/group/dscl.rb b/lib/chef/provider/group/dscl.rb
index e06c090f50..a59a94aa98 100644
--- a/lib/chef/provider/group/dscl.rb
+++ b/lib/chef/provider/group/dscl.rb
@@ -24,10 +24,9 @@ class Chef
def dscl(*args)
host = "."
stdout_result = ""; stderr_result = ""; cmd = "dscl #{host} -#{args.join(' ')}"
- status = popen4(cmd) do |pid, stdin, stdout, stderr|
- stdout.each { |line| stdout_result << line }
- stderr.each { |line| stderr_result << line }
- end
+ status = shell_out(cmd)
+ status.stdout.each_line { |line| stdout_result << line }
+ status.stderr.each_line { |line| stderr_result << line }
return [cmd, status, stdout_result, stderr_result]
end