Skip to content

Commit 87d1ba5

Browse files
committed
Merge remote-tracking branch 'deriamis/sshkey'
Conflicts: bin/lvmsync
2 parents f90a884 + 93e2dfb commit 87d1ba5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

bin/lvmsync

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ include LVM::Helpers
2828

2929
def main()
3030
# Parse me some options
31-
options = {}
31+
options = { :rsh => "ssh" }
32+
3233
OptionParser.new do |opts|
3334
opts.banner = "Usage: lvmsync [options]"
3435
opts.separator ""
@@ -65,6 +66,10 @@ def main()
6566
options[:source] = v
6667
end
6768

69+
opts.on("-e", "--rsh <command-string>", "Use specified command when invoking SSH") do |v|
70+
options[:rsh] = v
71+
end
72+
6873
opts.on("-V", "--version", "Print version of lvmsync") do |v|
6974
begin
7075
puts "lvmsync #{GVB.version}"
@@ -210,7 +215,7 @@ def run_client(opts)
210215
else
211216
verbose = opts[:verbose] ? '-v' : ''
212217
server_cmd = if desthost
213-
"ssh #{desthost} lvmsync --apply - #{snapback} #{verbose} #{destdev}"
218+
"#{opts[:rsh]} #{desthost} lvmsync --apply - #{snapback} #{verbose} #{destdev}"
214219
else
215220
"#{$0} --apply - #{snapback} #{verbose} #{destdev}"
216221
end

0 commit comments

Comments
 (0)