commit: 32dd11ac4e681ea9fadb0e8286468b518c0c252d
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 23 20:04:17 2020 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Jul 23 22:56:41 2020 +0000
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=32dd11ac
defaults/initrd.scripts: do_resume(): Use find_real_device() to determine
REAL_RESUME device
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
defaults/initrd.scripts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index 3bede8a..b307fe1 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -2574,6 +2574,15 @@ rundebugshell() {
}
do_resume() {
+ local device=$(find_real_device "${REAL_RESUME}")
+ if [ -z "${device}" ]
+ then
+ warn_msg "REAL_RESUME (${REAL_RESUME}) device not found;
Skipping resume ..."
+ return 0
+ else
+ REAL_RESUME="${device}"
+ fi
+
if [ -d /proc/suspend2 -o -d /sys/power/suspend2 -o -d
/sys/power/tuxonice ]
then
tuxonice_resume