35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
From a7a4b76c4ad5794f5f8a24ecd5b495f1512d05f7 Mon Sep 17 00:00:00 2001
|
|
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
|
Date: Fri, 1 Apr 2022 10:04:30 +0200
|
|
Subject: [PATCH] fix(resume): correct call to block_is_netdevice function
|
|
|
|
The block_is_netdevice function requires the device in <maj:min>
|
|
format, but the swap_devs array is populated with the content of
|
|
/proc/swaps, which prints the devices using their paths from /dev.
|
|
|
|
This causes the check method to never detect if swap is mounted on a
|
|
network device.
|
|
|
|
Reference:https://github.com/dracutdevs/dracut/commit/a7a4b76c4ad5794f5f8a24ecd5b495f1512d05f7
|
|
Conflict:NA
|
|
---
|
|
modules.d/95resume/module-setup.sh | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh
|
|
index 7e629435..5e891048 100755
|
|
--- a/modules.d/95resume/module-setup.sh
|
|
+++ b/modules.d/95resume/module-setup.sh
|
|
@@ -5,7 +5,7 @@ check() {
|
|
swap_on_netdevice() {
|
|
local _dev
|
|
for _dev in "${swap_devs[@]}"; do
|
|
- block_is_netdevice "$_dev" && return 0
|
|
+ block_is_netdevice "$(get_maj_min "$_dev")" && return 0
|
|
done
|
|
return 1
|
|
}
|
|
--
|
|
2.23.0
|
|
|