An array needed a deref, and an if condition got inverted

This commit is contained in:
Charles Pigott 2017-09-05 15:10:10 +01:00
parent 5849285815
commit ecde5acf4c
1 changed files with 3 additions and 2 deletions

View File

@ -69,10 +69,11 @@ if (length $args{'sshport'}) {
if (length $args{'sshkey'}) { if (length $args{'sshkey'}) {
$args{'sshkey'} = "-i $args{'sshkey'}"; $args{'sshkey'} = "-i $args{'sshkey'}";
} }
my $sshoptions = join " ", map { "-o " . $_ } $args{'sshoption'}; my $sshoptions = join " ", map { "-o " . $_ } @{$args{'sshoption'}}; # deref required
# figure out if source and/or target are remote. # figure out if source and/or target are remote.
$sshcmd = "$sshcmd $args{'sshcipher'} $sshoptions $args{'sshport'} $args{'sshkey'}"; $sshcmd = "$sshcmd $args{'sshcipher'} $sshoptions $args{'sshport'} $args{'sshkey'}";
if ($debug) { print "DEBUG: SSHCMD: $sshcmd\n"; }
my ($sourcehost,$sourcefs,$sourceisroot) = getssh($rawsourcefs); my ($sourcehost,$sourcefs,$sourceisroot) = getssh($rawsourcefs);
my ($targethost,$targetfs,$targetisroot) = getssh($rawtargetfs); my ($targethost,$targetfs,$targetisroot) = getssh($rawtargetfs);
@ -90,7 +91,7 @@ my %snaps;
## can loop across children separately, for recursive ## ## can loop across children separately, for recursive ##
## replication ## ## replication ##
if (defined $args{'recursive'}) { if (!defined $args{'recursive'}) {
syncdataset($sourcehost, $sourcefs, $targethost, $targetfs); syncdataset($sourcehost, $sourcefs, $targethost, $targetfs);
} else { } else {
if ($debug) { print "DEBUG: recursive sync of $sourcefs.\n"; } if ($debug) { print "DEBUG: recursive sync of $sourcefs.\n"; }