From ee32cb1ffb96484dd23ade86ac45c12aa8833bbb Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Wed, 15 Jun 2016 10:39:18 +0200 Subject: liveinit: DEBUG=4 dumps you into a debug shell right before the switch_root. After doing your debug checks you can then type "exit" to exit the debug shell. The init script will continue with the switch_root and boot the OS. --- liveinit | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/liveinit b/liveinit index f14439f..cb3f9d2 100755 --- a/liveinit +++ b/liveinit @@ -49,7 +49,8 @@ LIVEPATH="" VIRGIN=0 # Used for debugging the init; -# Set DEBUG to '1' to enable explicit pauses; '2' enables verbose script exec: +# Set DEBUG to '1' to enable explicit pauses; '2' enables verbose script exec; +# and '4' dumps you into a debug shell right before the switch_root: DEBUG=0 DEBUGV=" " @@ -214,7 +215,7 @@ done [ $DEBUG -ge 2 ] && set -x debugit () { - [ $DEBUG -eq 0 ] && return + [ $DEBUG -eq 0 -o $DEBUG -gt 3 ] && return echo "DEBUG>> -- blkid info -- :" blkid | while read LINE ; do echo "DEBUG>> $LINE" ; done echo "DEBUG>> -- mount info -- :" -- cgit v1.2.3