mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-18 20:47:55 +00:00
gpg_flash_rom: persist user config when flashing
If the user has changed the /boot config but not yet flashed, it's reasonable for them to expect that flashing to add/update a GPG key won't revert those changes. Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
This commit is contained in:
parent
6fc5571289
commit
57c4207bf8
@ -104,6 +104,12 @@ gpg_flash_rom() {
|
||||
cbfs -o /tmp/gpg-gui.rom -d "heads/initrd/.gnupg/otrust.txt"
|
||||
fi
|
||||
|
||||
# persist user config changes
|
||||
if (cbfs -o /tmp/gpg-gui.rom -l | grep -q "heads/initrd/etc/config.user") then
|
||||
cbfs -o /tmp/gpg-gui.rom -d "heads/initrd/etc/config.user"
|
||||
fi
|
||||
cbfs -o /tmp/gpg-gui.rom -a "heads/initrd/etc/config.user" -f /etc/config.user
|
||||
|
||||
/bin/flash.sh /tmp/gpg-gui.rom
|
||||
|
||||
if (whiptail --title 'BIOS Flashed Successfully' \
|
||||
|
Loading…
Reference in New Issue
Block a user