mirror of https://github.com/jimsalterjrs/sanoid
Additional changes to support -o usage
This commit is contained in:
parent
7f00c01e90
commit
c4ae73491c
9
syncoid
9
syncoid
|
|
@ -42,6 +42,11 @@ my $sshport = '-p 22';
|
||||||
my $sshoption;
|
my $sshoption;
|
||||||
if (defined $args{'o'}) {
|
if (defined $args{'o'}) {
|
||||||
$sshoption = "-o $args{'o'}";
|
$sshoption = "-o $args{'o'}";
|
||||||
|
if ($sshoption eq "NoneSwitch=yes"){
|
||||||
|
$sshcipher = ""
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$sshoption = "";
|
||||||
}
|
}
|
||||||
my $pvcmd = '/usr/bin/pv';
|
my $pvcmd = '/usr/bin/pv';
|
||||||
my $mbuffercmd = '/usr/bin/mbuffer';
|
my $mbuffercmd = '/usr/bin/mbuffer';
|
||||||
|
|
@ -56,10 +61,10 @@ if ( $args{'sshport'} ) {
|
||||||
}
|
}
|
||||||
# figure out if source and/or target are remote.
|
# figure out if source and/or target are remote.
|
||||||
if ( $args{'sshkey'} ) {
|
if ( $args{'sshkey'} ) {
|
||||||
$sshcmd = "$sshcmd $sshcipher $sshport -i $args{'sshkey'}";
|
$sshcmd = "$sshcmd $sshoption $sshcipher $sshport -i $args{'sshkey'}";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sshcmd = "$sshcmd $sshcipher $sshport";
|
$sshcmd = "$sshcmd $sshoption $sshcipher $sshport";
|
||||||
}
|
}
|
||||||
my ($sourcehost,$sourcefs,$sourceisroot) = getssh($rawsourcefs);
|
my ($sourcehost,$sourcefs,$sourceisroot) = getssh($rawsourcefs);
|
||||||
my ($targethost,$targetfs,$targetisroot) = getssh($rawtargetfs);
|
my ($targethost,$targetfs,$targetisroot) = getssh($rawtargetfs);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue