Blame 0008-resume-fix-swap-detection-in-hostonly.patch

Harald Hoyer 932373
From cfdec163f9dfd5e083f2c8a728c476381faa8baa Mon Sep 17 00:00:00 2001
Harald Hoyer 932373
From: Alexander Tsoy <alexander@tsoy.me>
Harald Hoyer 932373
Date: Wed, 9 Oct 2013 06:39:46 +0400
Harald Hoyer 932373
Subject: [PATCH] resume: fix swap detection in hostonly
Harald Hoyer 932373
Harald Hoyer 932373
Check for other possible fs types. This fixes swap detection when using
Harald Hoyer 932373
TuxOnIce kernel.
Harald Hoyer 932373
Harald Hoyer 932373
Note that parse-resume.sh generate udev rules with support for
Harald Hoyer 932373
ID_FS_TYPE=suspend, but we do not include it here, because it is
Harald Hoyer 932373
libvolume_id thing and host_fs_types is populated using blkid.
Harald Hoyer 932373
---
Harald Hoyer 932373
 modules.d/95resume/module-setup.sh | 2 +-
Harald Hoyer 932373
 1 file changed, 1 insertion(+), 1 deletion(-)
Harald Hoyer 932373
Harald Hoyer 932373
diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh
Harald Hoyer 932373
index b6d2c48..8b37616 100755
Harald Hoyer 932373
--- a/modules.d/95resume/module-setup.sh
Harald Hoyer 932373
+++ b/modules.d/95resume/module-setup.sh
Harald Hoyer 932373
@@ -7,7 +7,7 @@ check() {
Harald Hoyer 932373
     # No point trying to support resume, if no swap partition exist
Harald Hoyer 932373
     [[ $hostonly ]] || [[ $mount_needs ]] && {
Harald Hoyer 932373
         for fs in "${host_fs_types[@]}"; do
Harald Hoyer 932373
-            [[ $fs = swap ]] && return 0
Harald Hoyer 932373
+            [[ $fs =~ ^(swap|swsuspend|swsupend)$ ]] && return 0
Harald Hoyer 932373
         done
Harald Hoyer 932373
         return 255
Harald Hoyer 932373
     }