use PVE::Tools qw(run_command file_read_firstline dir_glob_foreach $IPV6RE);
use PVE::Cluster qw(cfs_read_file cfs_write_file cfs_lock_file);
use PVE::DataCenterConfig;
-use PVE::Exception qw(raise_param_exc);
+use PVE::Exception qw(raise_param_exc raise);
use PVE::JSONSchema;
use PVE::INotify;
use PVE::RPCEnvironment;
}
my $res = {};
+ my $err = '';
run_command($cmd,
noerr => 1,
- errfunc => sub { },
+ errfunc => sub {
+ $err .= "$_[0]\n"
+ },
outfunc => sub {
my $line = shift;
if ($line =~ m/(\S+)\s*Disk\s*(\S*)/) {
}
},
);
+ raise($err) if $err;
return $res;
}