mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-18 20:47:55 +00:00
bin/reboot: intercept reboot call when in DEBUG mode to type 'r' to go to recovery shell instead of rebooting
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
This commit is contained in:
parent
2ea62ff17e
commit
754e3c9165
@ -3,6 +3,15 @@
|
||||
|
||||
TRACE "Under /bin/reboot"
|
||||
|
||||
if [ "$CONFIG_DEBUG_OUTPUT" = "y" ];then
|
||||
#Generalize user prompt to continue reboot or go to recovery shell
|
||||
read -p "Press any key to continue reboot or 'r' to go to recovery shell: " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Rr]$ ]]; then
|
||||
recovery "Reboot call bypassed to go into recovery shell to debug"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Shut down TPM
|
||||
if [ "$CONFIG_TPM" = "y" ]; then
|
||||
tpmr shutdown
|
||||
|
Loading…
Reference in New Issue
Block a user