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 2C33113835A 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 7ADF5E0867; Sun, 14 Mar 2021 20:06:00 +0000 (UTC) Received: from smtp.gentoo.org (mail.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 646DBE0867 for ; Sun, 14 Mar 2021 20:06:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 939EC335DD0 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 C07885AE 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: <1615750448.20993333687bbcc00e5ca3b6e11f2eb1e01e085e.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/ X-VCS-Repository: proj/genkernel X-VCS-Files: defaults/initrd.scripts defaults/linuxrc X-VCS-Directories: defaults/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 20993333687bbcc00e5ca3b6e11f2eb1e01e085e 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: b9034e12-7097-4958-9415-1f1242872914 X-Archives-Hash: 5919127e4a2ce7c3b9925afd6a1bfbf0 commit: 20993333687bbcc00e5ca3b6e11f2eb1e01e085e Author: Thomas Deutschmann gentoo org> AuthorDate: Sun Mar 14 15:56:34 2021 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sun Mar 14 19:34:08 2021 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=20993333 linuxrc: Rename rundebugshell() -> run_debug_shell() Signed-off-by: Thomas Deutschmann gentoo.org> defaults/initrd.scripts | 26 +++++++++++--------------- defaults/linuxrc | 6 +++--- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index da15db7..3be18b5 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -821,7 +821,7 @@ setup_overlayfs() { local workdir="${overlay}/.work" local static=/mnt/livecd - rundebugshell overlayfs + run_debug_shell overlayfs for i in "${overlay}" "${static}" do [ ! -d "${i}" ] && run mkdir -p "${i}" @@ -1001,6 +1001,16 @@ run() { return ${retval} } +run_debug_shell() { + is_debug || return + + good_msg 'Starting debug shell as requested by "debug" option.' + good_msg "Run '${BOLD}gksosreport${NORMAL}' to generate debug report" + good_msg "in case you want to file a bug report." + good_msg "Stopping by: ${1}" + run_shell +} + run_emergency_shell() { echo gksosreport @@ -2516,20 +2526,6 @@ cdupdate() { fi } -rundebugshell() { - if is_debug - then - good_msg 'Starting debug shell as requested by "debug" option.' - good_msg "Run '${BOLD}gksosreport${NORMAL}' to generate debug report" - good_msg "in case you want to file a bug report." - else - return 0 - fi - - good_msg "Stopping by: ${1}" - run_shell -} - do_resume() { local device=$(find_real_device "${REAL_RESUME}") if [ -z "${device}" ] diff --git a/defaults/linuxrc b/defaults/linuxrc index 7888130..8356aea 100644 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -572,7 +572,7 @@ else fi # Run debug shell if requested -rundebugshell "before starting udevd" +run_debug_shell "before starting udevd" # Initialize udev if [ ! -f "/etc/udev/hwdb.bin" ] @@ -670,7 +670,7 @@ run mkdir -p "${NEW_ROOT}" CHROOT="${NEW_ROOT}" # Run debug shell if requested -rundebugshell "before setting up the root filesystem" +run_debug_shell "before setting up the root filesystem" if [ "${CDROOT}" = '1' ] then @@ -1331,7 +1331,7 @@ then fi # Run debug shell if requested -rundebugshell "before entering switch_root" +run_debug_shell "before switch_root" if [ "${GK_PRESERVE_RUN}" = '0' ] then