summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow (uranus) <paul@buetow.org>2015-10-18 11:15:32 +0100
committerPaul Buetow (uranus) <paul@buetow.org>2015-10-18 11:15:32 +0100
commit5c5739d9e669dfcecd9a4d8eada7ace356d3f6be (patch)
tree7cb38037cf59e7bbe723ae74cc6c6440e2d447b8
parent09d4eeb09eefb038ddd3645ff66192d50e261099 (diff)
wrap remote execution into sh
-rwxr-xr-xrubyfy.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/rubyfy.rb b/rubyfy.rb
index 1f33302..129368b 100755
--- a/rubyfy.rb
+++ b/rubyfy.rb
@@ -104,7 +104,7 @@ private
sudo = root ? "sudo " : ""
Net::SSH.start(server, user) do |session|
log(:VERBOSE, "#{server}::Executing #{sudo}#{command}")
- session.exec!("#{sudo}#{command}") do |channel, stream, data|
+ session.exec!("#{sudo}sh -c \"#{command}\"") do |channel, stream, data|
log(:OUT, "#{server}::#{data}") unless @conf["silent"]
end
end
@@ -157,6 +157,7 @@ begin
[ "--name", "-n", GetoptLong::OPTIONAL_ARGUMENT ],
[ "--outdir", "-o", GetoptLong::OPTIONAL_ARGUMENT ],
[ "--parallel", "-p", GetoptLong::OPTIONAL_ARGUMENT ],
+ [ "--precondition", "-P", GetoptLong::OPTIONAL_ARGUMENT ],
[ "--root", "-r", GetoptLong::OPTIONAL_ARGUMENT ],
[ "--silent", "-s", GetoptLong::OPTIONAL_ARGUMENT ],
[ "--timestamp", "-t", GetoptLong::OPTIONAL_ARGUMENT ],