Skip to content

Commit cd598d7

Browse files
committed
feat: stop VM as part of prepare.sh and remove redundand rm
1 parent 89b794b commit cd598d7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

custom-recipes/buildernet/mkosi/playground.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ recipe:
3333
env:
3434
BUILDERNET_IMAGE: ".flashbots-images/mkosi.output/buildernet-qemu_latest.qcow2"
3535
init:
36-
- rm -rf .runtime/buildernet-vm.qcow2 || true
3736
- ./scripts/prepare.sh
3837
start: ./scripts/start.sh
3938
stop:

custom-recipes/buildernet/mkosi/scripts/prepare.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ echo "prepare.sh: PROJECT_DIR=${PROJECT_DIR}"
3131
echo "prepare.sh: RUNTIME_DIR=${RUNTIME_DIR}"
3232
echo "prepare.sh: SOURCE=${SOURCE}"
3333

34+
# Ensure the VM is stopped before replacing runtime files (PID file, disk images).
35+
"${SCRIPT_DIR}/stop.sh"
36+
3437
rm -rf "${RUNTIME_DIR}"
3538
mkdir -p "${RUNTIME_DIR}"
3639

0 commit comments

Comments
 (0)