From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 24B70138359 for ; Thu, 23 Jul 2020 23:57:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4DE32E0848; Thu, 23 Jul 2020 23:57:39 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 33392E0848 for ; Thu, 23 Jul 2020 23:57:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 088C334F1CF for ; Thu, 23 Jul 2020 23:57:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7A00A2EB for ; Thu, 23 Jul 2020 23:57:34 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1595545001.32dd11ac4e681ea9fadb0e8286468b518c0c252d.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/ X-VCS-Repository: proj/genkernel X-VCS-Files: defaults/initrd.scripts X-VCS-Directories: defaults/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 32dd11ac4e681ea9fadb0e8286468b518c0c252d X-VCS-Branch: master Date: Thu, 23 Jul 2020 23:57:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6a29ab33-4dea-44e0-a526-a4d48ca05238 X-Archives-Hash: cdb4469bfa568f5eef815e9948af0ef3 commit: 32dd11ac4e681ea9fadb0e8286468b518c0c252d Author: Thomas Deutschmann gentoo org> AuthorDate: Thu Jul 23 20:04:17 2020 +0000 Commit: Thomas Deutschmann gentoo 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 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