X-Git-Url: https://code.grnet.gr/git/snf-image/blobdiff_plain/b1cb73f22c7ea6b94a98805f8af7d9d9f6540e16..3bb66facf7bd671267517d95cdaed0287fd36477:/snf-image-helper/snf-image-helper.in diff --git a/snf-image-helper/snf-image-helper.in b/snf-image-helper/snf-image-helper.in index 2ac51e2..7429743 100644 --- a/snf-image-helper/snf-image-helper.in +++ b/snf-image-helper/snf-image-helper.in @@ -109,12 +109,17 @@ if [ -z "$SNF_IMAGE_PROPERTY_EXCLUDE_ALL_TASKS" ]; then log_error "Required image property \`ROOT_PARTITION' is missing or empty." fi - export SNF_IMAGE_RESIZE_PART="$(get_partition_to_resize "$SNF_IMAGE_DEV")" - if [[ ! "$SNF_IMAGE_PROPERTY_OSFAMILY" =~ ^(linux|windows|freebsd)$ ]]; then log_error "Supported values for OSFAMILY property are: linux|windows|freebsd" fi + SNF_IMAGE_RESIZE_PART="$(get_partition_to_resize "$SNF_IMAGE_DEV")" + if [ -z "$SNF_IMAGE_RESIZE_PART" ]; then + exit 0 + fi + + export SNF_IMAGE_RESIZE_PART + # If something goes wrong with the tasks, try to umount the disk file # systems that are still mounted. trap '{ umount_all "$target"; }' ERR