diff --git a/packages/sysutils/busybox/scripts/init b/packages/sysutils/busybox/scripts/init index f7b28bbef7..56e8403d44 100755 --- a/packages/sysutils/busybox/scripts/init +++ b/packages/sysutils/busybox/scripts/init @@ -62,6 +62,8 @@ LIVE="no" + BREAK_TRIPPED="no" + # Get a serial number if present (eg. RPi) otherwise use MAC address from eth0 MACHINE_UID="$(cat /proc/cpuinfo | awk '/^Serial/{s=$3; gsub ("^0*","",s); print s}')" [ -z "$MACHINE_UID" ] && MACHINE_UID="$(cat /sys/class/net/eth0/address 2>/dev/null | tr -d :)" @@ -182,7 +184,7 @@ } debug_shell() { - echo "### Starting debugging shell... type exit to quit ###" + echo "### Starting debugging shell for boot step: $BOOT_STEP... type exit to quit ###" showcursor @@ -200,12 +202,17 @@ } break_after() { - # Start debug shell after boot step $1 - case $BREAK in - all|*$1*) - debug_shell - ;; - esac + # Start debug shell after boot step $1, and all subsequent steps + if [ $BREAK_TRIPPED == yes ]; then + debug_shell + else + case $BREAK in + all|*$1*) + BREAK_TRIPPED=yes + debug_shell + ;; + esac + fi } # Mount handlers