From edc55f087661ac9e7cb1f407441a9d6cb882e505 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Thu, 29 Oct 2020 18:04:22 +0100 Subject: [PATCH] testing: Create root image if it does not exist yet when building strongSwan This allows running the script directly after building the base image. --- testing/scripts/build-strongswan | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/testing/scripts/build-strongswan b/testing/scripts/build-strongswan index d872e7285..b7a44d66c 100755 --- a/testing/scripts/build-strongswan +++ b/testing/scripts/build-strongswan @@ -26,6 +26,10 @@ mkdir -p $IMGDIR case "$2" in "") + if [ ! -f "$ROOTIMG" ]; then + log_action "Creating root image $ROOTIMG" + execute "qemu-img create -b $BASEIMG -f $IMGEXT $ROOTIMG" + fi log_action "Connecting root image to NBD device $NBDEV" execute "qemu-nbd -c $NBDEV $ROOTIMG" ;;