+ if [[ "$IMAGE_NAME" =~ ^local:// ]]; then
+ IMAGE_NAME="${IMAGE_NAME:8}"
+ elif [[ "$IMAGE_NAME" =~ ^file:// ]]; then
+ IMAGE_NAME="${IMAGE_NAME:7}"
+ log_warning "The file:// back-end identifier is deprecated and " \
+ "will be removed in the future. Use local:// instead."
+ fi
+
+ if [ "$IMAGE_NAME" != "${IMAGE_NAME##*/}" ]; then
+ report_error "Image id is not allowed to contain /'s"
+ log_error "Image id is not allowed to contain /'s"
+ exit 1
+ fi
+
+ image_file="$IMAGE_DIR/$IMAGE_NAME.$IMAGE_TYPE"