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 5AD3513835B for ; Sun, 14 Mar 2021 20:06:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A5375E086A; Sun, 14 Mar 2021 20:06:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 8EA56E0869 for ; Sun, 14 Mar 2021 20:06:00 +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 AC8E533BE68 for ; Sun, 14 Mar 2021 20:05:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E85BB5B6 for ; Sun, 14 Mar 2021 20:05:56 +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: <1615750788.c81285f02aaad8bd8161d06976147e9c1aca7a8a.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: c81285f02aaad8bd8161d06976147e9c1aca7a8a X-VCS-Branch: master Date: Sun, 14 Mar 2021 20:05:56 +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: 5ad31145-e4a5-46f7-b984-89ee0ea5e6d3 X-Archives-Hash: 9118ef518a6f23763b5d1848c2350e74 commit: c81285f02aaad8bd8161d06976147e9c1aca7a8a Author: Thomas Deutschmann gentoo org> AuthorDate: Sun Mar 14 19:30:53 2021 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sun Mar 14 19:39:48 2021 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=c81285f0 initrd.scripts: run_shell(): Exit early when /dev is gone Signed-off-by: Thomas Deutschmann gentoo.org> defaults/initrd.scripts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 53cb633..ff956b0 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -1072,6 +1072,10 @@ run_shell() { ${SH} --login fi + # Leave function early when /dev/null does not exist anymore, + # i.e. after failed switch_root call + [ ! -e /dev/null ] && return + rm "${GK_SHELL_LOCKFILE}" echo