Skip to content

Commit

Permalink
F OpenNebula#4089: Improve firecracker clean.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian González committed Mar 6, 2020
1 parent 5b3e93c commit fddedf8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/vmm_mad/remotes/lib/firecracker/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ rm -rf "$ROOTFS_PATH/dev"
rm -f "$ROOTFS_PATH/api.socket"
rm -f "$ROOTFS_PATH/firecracker"

# Unmount VM directory
umount "$ROOTFS_PATH"
# Unmount VM directory (if necessary)
if grep -qs "$ROOTFS_PATH" /proc/mounts; then
umount "$ROOTFS_PATH"
fi

# Remove VM chroot directory
rm -rf $(dirname $ROOTFS_PATH)
Expand Down

0 comments on commit fddedf8

Please sign in to comment.