From 2e6abddb5e04b1acd18dba4c2be32b6838d0e49d Mon Sep 17 00:00:00 2001 From: Christoph Klaffl Date: Mon, 30 Mar 2020 19:01:54 +0200 Subject: [PATCH] fixed uninitialized value warning --- syncoid | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/syncoid b/syncoid index cef0e3a..554f5dd 100755 --- a/syncoid +++ b/syncoid @@ -120,6 +120,14 @@ if ($debug) { print "DEBUG: SSHCMD: $sshcmd\n"; } my ($sourcehost,$sourcefs,$sourceisroot) = getssh($rawsourcefs); my ($targethost,$targetfs,$targetisroot) = getssh($rawtargetfs); +my $sourcesudocmd = $sourceisroot ? '' : $sudocmd; +my $targetsudocmd = $targetisroot ? '' : $sudocmd; + +# figure out whether compression, mbuffering, pv +# are available on source, target, local machines. +# warn user of anything missing, then continue with sync. +my %avail = checkcommands(); + # handle insecure direct connection arguments my $directconnect = ""; my $directlisten = ""; @@ -145,14 +153,6 @@ if (length $args{'insecure-direct-connection'}) { } } -my $sourcesudocmd = $sourceisroot ? '' : $sudocmd; -my $targetsudocmd = $targetisroot ? '' : $sudocmd; - -# figure out whether compression, mbuffering, pv -# are available on source, target, local machines. -# warn user of anything missing, then continue with sync. -my %avail = checkcommands(); - my %snaps; my $exitcode = 0;