From ecde5acf4ca7afaa84cc0106911e4cac7c8cd795 Mon Sep 17 00:00:00 2001 From: Charles Pigott Date: Tue, 5 Sep 2017 15:10:10 +0100 Subject: [PATCH] An array needed a deref, and an if condition got inverted --- syncoid | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/syncoid b/syncoid index 8fa0453..c8d915f 100755 --- a/syncoid +++ b/syncoid @@ -69,10 +69,11 @@ if (length $args{'sshport'}) { if (length $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. $sshcmd = "$sshcmd $args{'sshcipher'} $sshoptions $args{'sshport'} $args{'sshkey'}"; +if ($debug) { print "DEBUG: SSHCMD: $sshcmd\n"; } my ($sourcehost,$sourcefs,$sourceisroot) = getssh($rawsourcefs); my ($targethost,$targetfs,$targetisroot) = getssh($rawtargetfs); @@ -90,7 +91,7 @@ my %snaps; ## can loop across children separately, for recursive ## ## replication ## -if (defined $args{'recursive'}) { +if (!defined $args{'recursive'}) { syncdataset($sourcehost, $sourcefs, $targethost, $targetfs); } else { if ($debug) { print "DEBUG: recursive sync of $sourcefs.\n"; }