From 9f715701236bdc418a174828cccf27a8ab63874c Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Thu, 7 May 2015 17:29:03 +0200 Subject: prepare-disk: check state of disk detection when an instance sees another --- testModule/scripts/setup-qcow2 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'testModule/scripts/setup-qcow2') diff --git a/testModule/scripts/setup-qcow2 b/testModule/scripts/setup-qcow2 index b14ccd87..86b69db2 100755 --- a/testModule/scripts/setup-qcow2 +++ b/testModule/scripts/setup-qcow2 @@ -57,6 +57,10 @@ create_qcow() { # check if we already created the qcow2-container [ -e "$QCOW_CONTAINER" ] && return 0 + # check if we have our target directory, if not create it + [ ! -d "$(busybox dirname $QCOW_CONTAINER)" ] && \ + mkdir -p "$(busybox dirname $QCOW_CONTAINER)" + # we did not, let's create it if ! qemu-img create -f qcow2 -o \ backing_file="$DNBD3_DEVICE",backing_fmt=qcow2 "$QCOW_CONTAINER"; then -- cgit v1.2.3-55-g7522