Updated to allow multiple options (-o) to be passed.

This commit is contained in:
Michael Brock 2017-07-28 17:43:47 -05:00
parent c4ae73491c
commit a26e3c4ad7
1 changed files with 8 additions and 5 deletions

13
syncoid
View File

@ -41,12 +41,15 @@ if (defined $args{'c'}) {
my $sshport = '-p 22';
my $sshoption;
if (defined $args{'o'}) {
$sshoption = "-o $args{'o'}";
if ($sshoption eq "NoneSwitch=yes"){
$sshcipher = ""
}
my @options = split(',', $args{'o'});
foreach my $option (@options) {
$sshoption .= " -o $option";
if ($option eq "NoneSwitch=yes") {
$sshcipher = "";
}
}
} else {
$sshoption = "";
$sshoption = "";
}
my $pvcmd = '/usr/bin/pv';
my $mbuffercmd = '/usr/bin/mbuffer';