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 <harshal.patil@in.ibm.com>
This commit is contained in:
Harshal Patil
2018-02-05 15:40:32 +05:30
parent 916fe973e2
commit 132e812fe4

View File

@@ -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