mirror of
https://github.com/churchers/vm-bhyve.git
synced 2025-12-11 09:20:17 +01:00
Fixing destroying vm in non-ZFS mode
Fixing issue https://github.com/churchers/vm-bhyve/issues/300
This commit is contained in:
committed by
GitHub
parent
7da944f990
commit
36e35ff899
@@ -744,7 +744,7 @@ core::destroy(){
|
||||
util::confirm "Are you sure you want to completely remove this virtual machine" || exit 0
|
||||
fi
|
||||
|
||||
zfs::destroy_dataset "${VM_DS_ZFS_DATASET:?}/${_name:?}"
|
||||
[ -n "${VM_DS_ZFS_DATASET}" ] && zfs::destroy_dataset "${VM_DS_ZFS_DATASET:?}/${_name:?}"
|
||||
[ -e "${VM_DS_PATH}/${_name}" ] && rm -R "${VM_DS_PATH:?}/${_name:?}"
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user