fixed uninitialized value warning

This commit is contained in:
Christoph Klaffl 2020-03-30 19:01:54 +02:00
parent 84bc3164f0
commit 2e6abddb5e
No known key found for this signature in database
GPG Key ID: 8FC1D76EED4970D2
1 changed files with 8 additions and 8 deletions

16
syncoid
View File

@ -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;