Commit 8fa8368d authored by Jérémie Gaidamour's avatar Jérémie Gaidamour

[dev] oar-properties: Added stderr output

parent 620ebc97
......@@ -352,10 +352,15 @@ def ssh_exec(site_uid, cmds, options)
c = Net::SSH.start(options[:ssh][:host].gsub("%s", site_uid), options[:ssh][:user], options[:ssh][:params])
c.open_channel { |channel|
channel.exec('sudo bash') { |ch, success|
# stdout
channel.on_data { |ch, data|
puts data #if options[:verbose] # ssh cmd output
}
# stderr
channel.on_extended_data do |ch, type, data|
puts data
end
cmds.each { |cmd|
channel.send_data cmd
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment