Blame SOURCES/0036-resume-fix-swap-detection-in-hostonly.patch

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