refactor(script): Abort early and with clear msg when no datasets snapshottable (#1)
This commit is contained in:
parent
c23567e2b1
commit
ff963aa844
@ -375,8 +375,18 @@ function main () {
|
|||||||
local local_snappable_datasets
|
local local_snappable_datasets
|
||||||
get_local_snappable_datasets
|
get_local_snappable_datasets
|
||||||
trim_globally_snappable_datasets
|
trim_globally_snappable_datasets
|
||||||
|
if [[ "${#snappable_datasets[@]}" -eq '0' ]]; then
|
||||||
|
pprint 'info' 'ZFS snapshot skipped, no local (= currently mounted) dataset has'
|
||||||
|
pprint 'info' 'property '"'"''"${zfs_prop}"''"'"' set to '"'"'true'"'"'. At the same'
|
||||||
|
pprint 'info' 'time option '"'"'snap_only_local_datasets'"'"' equals '"'"'true'"'"' so'
|
||||||
|
pprint 'info' 'we must only snapshot local datasets. Nothing to do here while'
|
||||||
|
pprint 'info' 'none of them have '"'"''"${zfs_prop}"''"'"' set to '"'"'true'"'"'.' '0'
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
snappable_datasets=("${globally_snappable_datasets}")
|
snappable_datasets=("${globally_snappable_datasets}")
|
||||||
|
if [[ "${#snappable_datasets[@]}" -eq '0' ]]; then
|
||||||
|
pprint 'info' 'ZFS snapshot skipped, no dataset has property '"'"''"${zfs_prop}"''"'"' set to '"'"'true'"'"'.' '0'
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local unabridged_pkg_list_oneline
|
local unabridged_pkg_list_oneline
|
||||||
|
Loading…
x
Reference in New Issue
Block a user