Gentoo Archives: gentoo-commits

From: Fabio Erculiani <lxnay@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/
Date: Mon, 29 Apr 2013 08:56:19
Message-Id: 1367229291.108f1daf60acfb48e94cf025252ce9d8cb71191a.lxnay@gentoo
1 commit: 108f1daf60acfb48e94cf025252ce9d8cb71191a
2 Author: Fabio Erculiani <lxnay <AT> sabayon <DOT> org>
3 AuthorDate: Thu Apr 25 15:55:56 2013 +0000
4 Commit: Fabio Erculiani <lxnay <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 29 09:54:51 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=108f1daf
7
8 linuxrc: run the debug shell multiple times, add a hook before switch_root
9
10 ---
11 defaults/initrd.scripts | 1 +
12 defaults/linuxrc | 5 ++++-
13 2 files changed, 5 insertions(+), 1 deletions(-)
14
15 diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
16 index c1969d1..9b0e899 100644
17 --- a/defaults/initrd.scripts
18 +++ b/defaults/initrd.scripts
19 @@ -1055,6 +1055,7 @@ rundebugshell() {
20 if [ -n "$DEBUG" ]
21 then
22 good_msg 'Starting debug shell as requested by "debug" option.'
23 + good_msg "Stopping by: ${1}"
24 do_rundebugshell
25 fi
26 }
27
28 diff --git a/defaults/linuxrc b/defaults/linuxrc
29 index 1d26aaf..4bbe5e2 100644
30 --- a/defaults/linuxrc
31 +++ b/defaults/linuxrc
32 @@ -424,7 +424,7 @@ mkdir -p "${NEW_ROOT}"
33 CHROOT="${NEW_ROOT}"
34
35 # Run debug shell if requested
36 -rundebugshell
37 +rundebugshell "before setting up the root filesystem"
38
39 if [ "${CDROOT}" = '1' ]
40 then
41 @@ -937,6 +937,9 @@ then
42 bad_msg "ERROR: your real /dev is missing tty1, required for splash"
43 fi
44
45 +# Run debug shell if requested
46 +rundebugshell "before entering switch_root"
47 +
48 exec /sbin/switch_root -c "/dev/console" "${CHROOT}" "${REAL_INIT:-/sbin/init}" "${INIT_OPTS}"
49
50 # If we get here, something bad has happened