commit:     20993333687bbcc00e5ca3b6e11f2eb1e01e085e
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 14 15:56:34 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> 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 <whissi <AT> 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

Reply via email to