mirror of
https://github.com/linuxboot/heads.git
synced 2025-02-21 09:31:51 +00:00
functions/recovery: loop recovery shell when exited (#835)
Currently, exiting the recovery shell results in a kernel panic, necessitating a hard reset / power cycle. As this is less than ideal, drop the exec and add a loop to restart the shell. Addresses issue #833 Tested under qemu-coreboot-fbwhiptail Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
This commit is contained in:
parent
53c74fa02a
commit
0eb1f69216
@ -25,14 +25,20 @@ recovery() {
|
|||||||
if [ "$CONFIG_TPM" = y ]; then
|
if [ "$CONFIG_TPM" = y ]; then
|
||||||
tpm extend -ix 4 -ic recovery
|
tpm extend -ix 4 -ic recovery
|
||||||
fi
|
fi
|
||||||
echo >&2 "!!!!! Starting recovery shell"
|
|
||||||
sleep 1
|
|
||||||
|
|
||||||
if [ -x /bin/setsid ]; then
|
while [ true ]
|
||||||
exec /bin/setsid -c /bin/ash
|
do
|
||||||
else
|
echo >&2 "!!!!! Starting recovery shell"
|
||||||
exec /bin/ash
|
sleep 1
|
||||||
fi
|
|
||||||
|
if [ -x /bin/setsid ]; then
|
||||||
|
/bin/setsid -c /bin/ash
|
||||||
|
else
|
||||||
|
/bin/ash
|
||||||
|
fi
|
||||||
|
# clear screen
|
||||||
|
printf "\033c"
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
pause_recovery() {
|
pause_recovery() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user