error out if no datasets are processed with recursive arg
This commit is contained in:
parent
85561ddcda
commit
132c765e28
6
syncoid
6
syncoid
|
@ -124,6 +124,12 @@ if (!defined $args{'recursive'}) {
|
||||||
if ($debug) { print "DEBUG: recursive sync of $sourcefs.\n"; }
|
if ($debug) { print "DEBUG: recursive sync of $sourcefs.\n"; }
|
||||||
my @datasets = getchilddatasets($sourcehost, $sourcefs, $sourceisroot);
|
my @datasets = getchilddatasets($sourcehost, $sourcefs, $sourceisroot);
|
||||||
|
|
||||||
|
if (!@datasets) {
|
||||||
|
warn "CRITICAL ERROR: no datasets found";
|
||||||
|
@datasets = ();
|
||||||
|
$exitcode = 2;
|
||||||
|
}
|
||||||
|
|
||||||
my @deferred;
|
my @deferred;
|
||||||
|
|
||||||
foreach my $datasetProperties(@datasets) {
|
foreach my $datasetProperties(@datasets) {
|
||||||
|
|
Loading…
Reference in New Issue