aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-11-20 11:54:48 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-11-20 11:54:48 -0200
commit526a65dd956cb953950141c11040e7df9ad740a5 (patch)
treee9857e51fef53332d69925f961e20083b9f2d328
parent7b9a7035d06ac2c1cd2ea1726d567bfc6cd06071 (diff)
downloadkvmx-526a65dd956cb953950141c11040e7df9ad740a5.tar.gz
kvmx-526a65dd956cb953950141c11040e7df9ad740a5.tar.bz2
Test swapfile presence at kvmx_hibernate
-rwxr-xr-xkvmx5
1 files changed, 5 insertions, 0 deletions
diff --git a/kvmx b/kvmx
index aa17626..f2c73a0 100755
--- a/kvmx
+++ b/kvmx
@@ -635,6 +635,11 @@ function kvmx_hibernate {
exit 1
fi
+ if ! kvmx_ssh test -s /swapfile; then
+ echo "Seems like /swapfile is absent in the guest, aborting"
+ exit 1
+ fi
+
# Currently 9p driver won't survive a reboot
# Umount shared folders
#if [ ! -z "$shared_folder" ] && [ ! -z "$shared_folder_mountpoint" ]; then