mirror of
https://github.com/linuxboot/heads.git
synced 2025-02-20 09:16:21 +00:00
gpg_add_key_reflash: handle user cancellation
if user chooses abort option, exit without flashing ROM Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
This commit is contained in:
parent
c33209add1
commit
e8e1032027
@ -196,7 +196,12 @@ gpg_add_key_reflash() {
|
||||
find /media -name '*.key' > /tmp/filelist.txt
|
||||
find /media -name '*.asc' >> /tmp/filelist.txt
|
||||
file_selector "/tmp/filelist.txt" "Choose your GPG public key"
|
||||
PUBKEY=$FILE
|
||||
# bail if user didn't select a file
|
||||
if [ "$FILE" = "" ]; then
|
||||
return
|
||||
else
|
||||
PUBKEY=$FILE
|
||||
fi
|
||||
|
||||
/bin/flash.sh -r /tmp/gpg-gui.rom
|
||||
if [ ! -s /tmp/gpg-gui.rom ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user