Merge pull request #250 from matthewfischer/max_attempts

Print attempt number after max check
This commit is contained in:
James O. D. Hunt 2019-03-25 10:32:49 +00:00 committed by GitHub
commit 0b7e456d47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -224,10 +224,10 @@ detach()
create_rootfs_disk() create_rootfs_disk()
{ {
ATTEMPT_NUM=$(($ATTEMPT_NUM+1)) ATTEMPT_NUM=$(($ATTEMPT_NUM+1))
info "Create root disk image. Attempt ${ATTEMPT_NUM} out of ${MAX_ATTEMPTS}."
if [ ${ATTEMPT_NUM} -gt ${MAX_ATTEMPTS} ]; then if [ ${ATTEMPT_NUM} -gt ${MAX_ATTEMPTS} ]; then
die "Unable to create root disk image." die "Unable to create root disk image."
fi fi
info "Create root disk image. Attempt ${ATTEMPT_NUM} out of ${MAX_ATTEMPTS}."
calculate_img_size calculate_img_size
if [ ${OLD_IMG_SIZE} -ne 0 ]; then if [ ${OLD_IMG_SIZE} -ne 0 ]; then