From ad5d879f8c441745c27c3b72d658558311b84a88 Mon Sep 17 00:00:00 2001 From: Matt Fischer Date: Fri, 15 Mar 2019 22:56:35 -0600 Subject: [PATCH] rootfs: Print attempt number after max check With the old code it was possible to see odd messages like: "INFO: Create root disk image. Attempt 6 out of 5." Move the attempt number print to after we check against the max Fixes #251 Signed-off-by: Matt Fischer --- image-builder/image_builder.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image-builder/image_builder.sh b/image-builder/image_builder.sh index d66b4b9cf..ca2eff8b4 100755 --- a/image-builder/image_builder.sh +++ b/image-builder/image_builder.sh @@ -205,10 +205,10 @@ detach() create_rootfs_disk() { ATTEMPT_NUM=$(($ATTEMPT_NUM+1)) - info "Create root disk image. Attempt ${ATTEMPT_NUM} out of ${MAX_ATTEMPTS}." if [ ${ATTEMPT_NUM} -gt ${MAX_ATTEMPTS} ]; then die "Unable to create root disk image." fi + info "Create root disk image. Attempt ${ATTEMPT_NUM} out of ${MAX_ATTEMPTS}." calculate_img_size if [ ${OLD_IMG_SIZE} -ne 0 ]; then