From: Antonio Alvarez Feijoo Date: Fri, 1 Apr 2022 08:04:30 +0000 (+0200) Subject: fix(resume): correct call to block_is_netdevice function X-Git-Tag: 057~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7a4b76c4ad5794f5f8a24ecd5b495f1512d05f7;p=thirdparty%2Fdracut.git fix(resume): correct call to block_is_netdevice function The block_is_netdevice function requires the device in 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. --- diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh index 7e6294359..5e8910489 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 }