mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-19 21:17:55 +00:00
config-gui.sh: fix bug happening when clearing all user config settings/calling config-gui.sh from recovery shell
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
This commit is contained in:
parent
d128fa3f87
commit
4e22b503ba
@ -182,19 +182,21 @@ while true; do
|
|||||||
\n\nDo you want to proceed?" 0 80) then
|
\n\nDo you want to proceed?" 0 80) then
|
||||||
read_rom /tmp/config-gui.rom
|
read_rom /tmp/config-gui.rom
|
||||||
# clear local keyring
|
# clear local keyring
|
||||||
rm /.gnupg/* | true
|
rm -rf /.gnupg/* || true
|
||||||
|
|
||||||
# clear /boot signatures/checksums
|
# clear /boot signatures/checksums
|
||||||
|
detect_boot_device
|
||||||
mount -o remount,rw /boot
|
mount -o remount,rw /boot
|
||||||
rm /boot/kexec* | true
|
rm -f /boot/kexec* || true
|
||||||
mount -o remount,ro /boot
|
mount -o remount,ro /boot
|
||||||
|
|
||||||
# clear GPG keys and user settings
|
# clear GPG keys and user settings
|
||||||
for i in `cbfs.sh -o /tmp/config-gui.rom -l | grep -e "heads/"`; do
|
for i in `cbfs.sh -o /tmp/config-gui.rom -l | grep -e "heads/"`; do
|
||||||
cbfs.sh -o /tmp/config-gui.rom -d $i
|
cbfs.sh -o /tmp/config-gui.rom -d $i
|
||||||
done
|
done
|
||||||
# flash cleared ROM
|
# flash cleared ROM
|
||||||
|
|
||||||
|
|
||||||
/bin/flash.sh -c /tmp/config-gui.rom
|
/bin/flash.sh -c /tmp/config-gui.rom
|
||||||
|
|
||||||
# reset TPM if present
|
# reset TPM if present
|
||||||
if [ "$CONFIG_TPM" = "y" ]; then
|
if [ "$CONFIG_TPM" = "y" ]; then
|
||||||
/bin/tpm-reset
|
/bin/tpm-reset
|
||||||
|
Loading…
Reference in New Issue
Block a user