handled empty syncoid:sync property - behaves like unset

This commit is contained in:
Attie Grande 2018-08-06 14:16:25 +01:00
parent 60b2dedc45
commit d0ba0bc284
2 changed files with 5 additions and 2 deletions

View File

@ -140,7 +140,9 @@ As of 1.4.18, syncoid also automatically supports and enables resume of interrup
_Note_: this will also prevent syncoid from handling the dataset if given explicitly on the command line.
_Note_: syncing a child of a no-sync dataset will currently result in a critical error
_Note_: syncing a child of a no-sync dataset will currently result in a critical error.
_Note_: empty properties will be handled as if they were unset.
##### Syncoid Command Line Options

View File

@ -185,7 +185,8 @@ sub syncdataset {
my $sync = getzfsvalue($sourcehost,$sourcefs,$sourceisroot,'syncoid:sync');
if ($sync eq 'true' || $sync eq '-') {
if ($sync eq 'true' || $sync eq '-' || $sync eq '') {
# empty is handled the same as unset (aka: '-')
# definitely sync this dataset - if a host is called 'true' or '-', then you're special
} elsif ($sync eq 'false') {
if (!$quiet) { print "INFO: Skipping dataset (syncoid:sync=false): $sourcefs...\n"; }