From 132e812fe4b71a4d982415cd25c153cb457b5dec Mon Sep 17 00:00:00 2001 From: Harshal Patil Date: Mon, 5 Feb 2018 15:40:32 +0530 Subject: [PATCH] scripts : handle 0 and negative root disk sizes When user manually specifies root disk image size the value should be greater than 0. Fixes : #57 Signed-off-by: Harshal Patil --- 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 f79d583f54..d604fe3c9f 100755 --- a/image-builder/image_builder.sh +++ b/image-builder/image_builder.sh @@ -85,7 +85,7 @@ do h) usage ;; o) IMAGE="${OPTARG}" ;; s) IMG_SIZE=${OPTARG} - if [ ${IMG_SIZE} -lt 0 ]; then + if [ ${IMG_SIZE} -le 0 ]; then die "Image size has to be greater than 0 MB." fi if [ ${IMG_SIZE} -gt ${MAX_IMG_SIZE_MB} ]; then