adding return

master
Heuzef 5 years ago
parent 0213257d2d
commit 70e407b238
  1. 20
      Check.pm

@ -167,23 +167,6 @@ EOF
sub size_consistency sub size_consistency
{ {
my $host = undef;
my $entity = undef;
my $pretty = 0;
GetOptions(
"host=s" => \$host,
"entity=s" => \$entity,
"pretty" => \$pretty
);
# We need to switch to backuppc UID/GID
my $uid = getuid();
my $gid = getgid();
my (undef,undef,$bkpuid,$bkpgid) = getpwnam('backuppc');
setuid($bkpuid) if ($uid ne $bkpuid);
setgid($bkpgid) if ($gid ne $bkpgid);
my $bpc = BackupPC::Lib->new(); my $bpc = BackupPC::Lib->new();
my $mainConf = $bpc->ConfigDataRead(); my $mainConf = $bpc->ConfigDataRead();
my $json = {}; my $json = {};
@ -333,6 +316,9 @@ sub size_consistency
else { else {
my $sizeConsistency = print("ANOMALOUS"); my $sizeConsistency = print("ANOMALOUS");
} }
chomp $sizeConsistency;
return $sizeConsistency;
} }
1; 1;

Loading…
Cancel
Save