ad54c5
From 21b7898d5c3a074203d6cb8a71962010874f87bb Mon Sep 17 00:00:00 2001
ad54c5
From: Lukas Nykryn <lnykryn@redhat.com>
ad54c5
Date: Tue, 15 Feb 2022 13:47:40 +0100
ad54c5
Subject: [PATCH] fix(95resume): only exclude this module, when swap is netdev
c2f1e0
ad54c5
Resolves: #2017787
c2f1e0
---
ad54c5
 modules.d/95resume/module-setup.sh | 5 ++---
ad54c5
 1 file changed, 2 insertions(+), 3 deletions(-)
c2f1e0
ad54c5
diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh
ad54c5
index 5e891048..4b8d8422 100755
ad54c5
--- a/modules.d/95resume/module-setup.sh
ad54c5
+++ b/modules.d/95resume/module-setup.sh
ad54c5
@@ -10,10 +10,9 @@ check() {
ad54c5
         return 1
ad54c5
     }
ad54c5
 
ad54c5
-    # Only support resume if hibernation is currently on
ad54c5
-    # and no swap is mounted on a net device
ad54c5
+    # Only support resume if no swap is mounted on a net device
ad54c5
     [[ $hostonly ]] || [[ $mount_needs ]] && {
ad54c5
-        swap_on_netdevice || [[ -f /sys/power/resume && "$(cat /sys/power/resume)" == "0:0" ]] && return 255
ad54c5
+        swap_on_netdevice && return 255
ad54c5
     }
ad54c5
 
ad54c5
     return 0