]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Test swapfile presence at kvmx_hibernate
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 20 Nov 2017 13:54:48 +0000 (11:54 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 20 Nov 2017 13:54:48 +0000 (11:54 -0200)
kvmx

diff --git a/kvmx b/kvmx
index aa17626895af80471e113d8dd8e3156aa65430cf..f2c73a0f3957b48eebf91ceb5a16082abe7e2a8f 100755 (executable)
--- 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