feat(script): Print warning and exit gracefully if snapshot name would be too long (#1)
This commit is contained in:
parent
f8592c215a
commit
7747e9bdc3
@ -160,6 +160,10 @@ function find_max_dataset_name_length () {
|
|||||||
max_dataset_name_length="${#dataset_name_no_pkgs}"
|
max_dataset_name_length="${#dataset_name_no_pkgs}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [[ "${max_dataset_name_length}" -gt "${max_zfs_snapshot_name_length}" ]]; then
|
||||||
|
pprint 'warn' 'Snapshot name would exceed ZFS '"${max_zfs_snapshot_name_length}"' chars limit. Skipping snapshots ...' '0'
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function main () {
|
function main () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user