]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
testing: Create root image if it does not exist yet when building strongSwan
authorTobias Brunner <tobias@strongswan.org>
Thu, 29 Oct 2020 17:04:22 +0000 (18:04 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 27 Nov 2020 11:05:22 +0000 (12:05 +0100)
This allows running the script directly after building the base image.

testing/scripts/build-strongswan

index d872e72854d0002a60e29cbf99281416f631988d..b7a44d66cc6866dc5413c53fa737d0f383b7cf12 100755 (executable)
@@ -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"
        ;;