testing: Create root image if it does not exist yet when building strongSwan

This allows running the script directly after building the base image.
This commit is contained in:
Tobias Brunner
2020-11-27 12:05:22 +01:00
parent 29c59885ca
commit edc55f0876
+4
View File
@@ -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"
;;