diff --git a/src/tm_mad/qcow2/clone b/src/tm_mad/qcow2/clone index 61b80177f7..bbce31ac90 100755 --- a/src/tm_mad/qcow2/clone +++ b/src/tm_mad/qcow2/clone @@ -90,9 +90,7 @@ http://*) *) log "Cloning $SRC_PATH in $DST" - if [ -n $ORIGINAL_SIZE ]; then - ORIGINAL_SIZE="0" - fi + ORIGINAL_SIZE=${ORIGINAL_SIZE:-0} if [ "$SIZE" -ge "$ORIGINAL_SIZE" ]; then RESIZE_CMD="; qemu-img resize ${DST_PATH} ${SIZE}M" diff --git a/src/tm_mad/shared/clone b/src/tm_mad/shared/clone index 69525d0621..efb151d4d0 100755 --- a/src/tm_mad/shared/clone +++ b/src/tm_mad/shared/clone @@ -95,9 +95,7 @@ http://*) *) log "Cloning $SRC_PATH in $DST" - if [ -n $ORIGINAL_SIZE ]; then - ORIGINAL_SIZE="0" - fi + ORIGINAL_SIZE=${ORIGINAL_SIZE:-0} if [ "$SIZE" -ge "$ORIGINAL_SIZE" ]; then RESIZE_CMD="; qemu-img resize ${DST_PATH} ${SIZE}M" diff --git a/src/tm_mad/ssh/clone b/src/tm_mad/ssh/clone index 8e01fa89aa..e145fba522 100755 --- a/src/tm_mad/ssh/clone +++ b/src/tm_mad/ssh/clone @@ -93,9 +93,7 @@ http://*) "Error copying $SRC to $DST" fi - if [ -n $ORIGINAL_SIZE ]; then - ORIGINAL_SIZE="0" - fi + ORIGINAL_SIZE=${ORIGINAL_SIZE:-0} if [ "$SIZE" -ge "$ORIGINAL_SIZE" ]; then RESIZE_CMD="qemu-img resize ${DST_PATH} ${SIZE}M"