aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Erculiani <lxnay@sabayon.org>2013-04-25 16:55:56 +0100
committerFabio Erculiani <lxnay@sabayon.org>2013-04-29 10:54:51 +0100
commit108f1daf60acfb48e94cf025252ce9d8cb71191a (patch)
tree91dc2695eab5d8b89bad8019ff6d3384bd5e2b7d
parentlinuxrc: use "quiet" cmdline argument for a really quiet initramfs initializa... (diff)
downloadgenkernel-108f1daf60acfb48e94cf025252ce9d8cb71191a.tar.gz
genkernel-108f1daf60acfb48e94cf025252ce9d8cb71191a.tar.bz2
genkernel-108f1daf60acfb48e94cf025252ce9d8cb71191a.zip
linuxrc: run the debug shell multiple times, add a hook before switch_root
-rw-r--r--defaults/initrd.scripts1
-rw-r--r--defaults/linuxrc5
2 files changed, 5 insertions, 1 deletions
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index c1969d11..9b0e8992 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -1055,6 +1055,7 @@ rundebugshell() {
if [ -n "$DEBUG" ]
then
good_msg 'Starting debug shell as requested by "debug" option.'
+ good_msg "Stopping by: ${1}"
do_rundebugshell
fi
}
diff --git a/defaults/linuxrc b/defaults/linuxrc
index 1d26aaf0..4bbe5e27 100644
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -424,7 +424,7 @@ mkdir -p "${NEW_ROOT}"
CHROOT="${NEW_ROOT}"
# Run debug shell if requested
-rundebugshell
+rundebugshell "before setting up the root filesystem"
if [ "${CDROOT}" = '1' ]
then
@@ -937,6 +937,9 @@ then
bad_msg "ERROR: your real /dev is missing tty1, required for splash"
fi
+# Run debug shell if requested
+rundebugshell "before entering switch_root"
+
exec /sbin/switch_root -c "/dev/console" "${CHROOT}" "${REAL_INIT:-/sbin/init}" "${INIT_OPTS}"
# If we get here, something bad has happened