diff options
| author | Jonathan Bauer | 2015-05-07 17:29:03 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2015-05-07 17:29:03 +0200 |
| commit | 9f715701236bdc418a174828cccf27a8ab63874c (patch) | |
| tree | 734a657d86ff99d4768c141724e5a3b8f631bec9 /testModule/scripts/setup-qcow2 | |
| parent | minor - flag names ... (diff) | |
| download | systemd-init-9f715701236bdc418a174828cccf27a8ab63874c.tar.gz systemd-init-9f715701236bdc418a174828cccf27a8ab63874c.tar.xz systemd-init-9f715701236bdc418a174828cccf27a8ab63874c.zip | |
prepare-disk: check state of disk detection when an instance sees another
Diffstat (limited to 'testModule/scripts/setup-qcow2')
| -rwxr-xr-x | testModule/scripts/setup-qcow2 | 4 |
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 |
