aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2021-03-14 16:56:34 +0100
committerThomas Deutschmann <whissi@gentoo.org>2021-03-14 20:34:08 +0100
commit20993333687bbcc00e5ca3b6e11f2eb1e01e085e (patch)
treea569569e796eaf8e91001c132990e1dfb215488b
parentinitrd.scripts: modules_scan(): Rename GK_ROOTFS_DETECTED_STATEFILE -> GK_ROO... (diff)
downloadgenkernel-20993333687bbcc00e5ca3b6e11f2eb1e01e085e.tar.gz
genkernel-20993333687bbcc00e5ca3b6e11f2eb1e01e085e.tar.bz2
genkernel-20993333687bbcc00e5ca3b6e11f2eb1e01e085e.zip
linuxrc: Rename rundebugshell() -> run_debug_shell()
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
-rw-r--r--defaults/initrd.scripts26
-rw-r--r--defaults/linuxrc6
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