summaryrefslogtreecommitdiffstats
path: root/testModule/scripts/setup-qcow2
diff options
context:
space:
mode:
Diffstat (limited to 'testModule/scripts/setup-qcow2')
-rwxr-xr-xtestModule/scripts/setup-qcow24
1 files changed, 4 insertions, 0 deletions
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