summaryrefslogtreecommitdiffstats
path: root/remote/rootfs
diff options
context:
space:
mode:
authorSimon Rettberg2016-01-18 16:26:49 +0100
committerSimon Rettberg2016-01-18 16:26:49 +0100
commit7f2f88c1d93b521a27c9593d85bb8a75e804456a (patch)
treeec149e26773803b46503ab915fc03c14ba0afa0f /remote/rootfs
parent[run-virt] Don't exit 1 if we don't have a vmstore as it's optional nowadays (diff)
downloadtm-scripts-7f2f88c1d93b521a27c9593d85bb8a75e804456a.tar.gz
tm-scripts-7f2f88c1d93b521a27c9593d85bb8a75e804456a.tar.xz
tm-scripts-7f2f88c1d93b521a27c9593d85bb8a75e804456a.zip
[rfs-stage31] Enable debug-shell in stage32 if we have debug= on cmdline
Diffstat (limited to 'remote/rootfs')
-rw-r--r--remote/rootfs/rootfs-stage31/data/inc/parse_kcl4
-rwxr-xr-xremote/rootfs/rootfs-stage31/data/init3
2 files changed, 6 insertions, 1 deletions
diff --git a/remote/rootfs/rootfs-stage31/data/inc/parse_kcl b/remote/rootfs/rootfs-stage31/data/inc/parse_kcl
index 13f9c467..4a69ac25 100644
--- a/remote/rootfs/rootfs-stage31/data/inc/parse_kcl
+++ b/remote/rootfs/rootfs-stage31/data/inc/parse_kcl
@@ -22,7 +22,9 @@ read KCL < "/proc/cmdline"
for opts in ${KCL}; do
case "${opts}" in
debug=*)
- DEBUG=${opts#debug=} ;;
+ DEBUG=${opts#debug=}
+ DEBUG_SHELL=set
+ ;;
ip=*)
# process IP info
parse_ip ${opts#ip=} ;;
diff --git a/remote/rootfs/rootfs-stage31/data/init b/remote/rootfs/rootfs-stage31/data/init
index 81b9c89b..1537e012 100755
--- a/remote/rootfs/rootfs-stage31/data/init
+++ b/remote/rootfs/rootfs-stage31/data/init
@@ -106,6 +106,9 @@ fi
# one last debug shell if activated
[ $DEBUG -ge 1 ] && drop_shell "Requested Debug Shell: before switch_root."
+# Activate debug shell after switchroot?
+[ -n "$DEBUG_SHELL" ] && ln -s "../debug-shell.service" "${FUTURE_ROOT}/usr/lib/systemd/system/sysinit.target.wants/debug-shell.service"
+
# need /proc for this ;)
bench_event "PRESWITCH" "Switching to stage 3.2"