Skip to content

Commit

Permalink
Merge remote-tracking branch 'deriamis/sshkey'
Browse files Browse the repository at this point in the history
Conflicts:
	bin/lvmsync
  • Loading branch information
mpalmer committed Oct 14, 2014
2 parents f90a884 + 93e2dfb commit 87d1ba5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bin/lvmsync
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ include LVM::Helpers

def main()
# Parse me some options
options = {}
options = { :rsh => "ssh" }

OptionParser.new do |opts|
opts.banner = "Usage: lvmsync [options]"
opts.separator ""
Expand Down Expand Up @@ -65,6 +66,10 @@ def main()
options[:source] = v
end

opts.on("-e", "--rsh <command-string>", "Use specified command when invoking SSH") do |v|
options[:rsh] = v
end

opts.on("-V", "--version", "Print version of lvmsync") do |v|
begin
puts "lvmsync #{GVB.version}"
Expand Down Expand Up @@ -210,7 +215,7 @@ def run_client(opts)
else
verbose = opts[:verbose] ? '-v' : ''
server_cmd = if desthost
"ssh #{desthost} lvmsync --apply - #{snapback} #{verbose} #{destdev}"
"#{opts[:rsh]} #{desthost} lvmsync --apply - #{snapback} #{verbose} #{destdev}"
else
"#{$0} --apply - #{snapback} #{verbose} #{destdev}"
end
Expand Down

0 comments on commit 87d1ba5

Please sign in to comment.