Skip to content

Commit

Permalink
remove monitor file only when it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Feb 19, 2018
1 parent 490575d commit ae23f19
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build-vm
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,10 @@ vm_img_wipe() {
vm_wipe_$VM_TYPE "$@"

if test -n "$VM_ROOT" -a "$VM_ROOT_TYPE" = file ; then
rm -f "$VM_ROOT" "${VM_ROOT}.monitor"
rm -f "$VM_ROOT"
if test -e "${VM_ROOT}.monitor"; then
rm -f "${VM_ROOT}.monitor"
fi
fi
if test -n "$VM_SWAP" -a "$VM_SWAP_TYPE" = file ; then
rm -f "$VM_SWAP"
Expand Down

0 comments on commit ae23f19

Please sign in to comment.