--menu "Select the firmware function to perform\n\nRetaining settings copies existing settings to the new firmware:\n* Keeps your GPG keyring\n* Keeps changes to the default /boot device\n\nErasing settings uses the new firmware as-is:\n* Erases any existing GPG keyring\n* Restores firmware to default factory settings\n\nIf you are just updating your firmware, you probably want to retain\nyour settings."209010\
'f'' Flash the firmware with a new ROM, retain settings'\
'c'' Flash the firmware with a new ROM, erase settings'\
if(whiptail --title 'Flash the BIOS with a new ROM'\
--yesno "This requires you insert a USB drive containing:\n* Your BIOS image (*.rom)\n\nAfter you select this file, this program will reflash your BIOS\n\nDo you want to proceed?"16 90)then
mount_usb
if grep -q /media /proc/mounts ;then
find /media -name '*.rom' > /tmp/filelist.txt
file_selector "/tmp/filelist.txt""Choose the ROM to flash"
if["$FILE"==""];then
return
else
ROM=$FILE
fi
if(whiptail --title 'Flash ROM?'\
--yesno "This will replace your old ROM with $ROM\n\nDo you want to proceed?"16 90)then