Merge pull request #666 from MrChromebox/flash_gui-fixup

flash-gui: set unset variable USB_FAILED
This commit is contained in:
Kyle Rankin 2020-01-29 12:00:55 -08:00 committed by GitHub
commit bcf522cb2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,7 @@ set -e -o pipefail
mount_usb(){
# Mount the USB boot device
if ! grep -q /media /proc/mounts ; then
mount-usb "$CONFIG_USB_BOOT_DEV" || USB_FAILED=1
mount-usb "$CONFIG_USB_BOOT_DEV" && USB_FAILED=0 || USB_FAILED=1
if [ $USB_FAILED -ne 0 ]; then
if [ ! -e "$CONFIG_USB_BOOT_DEV" ]; then
whiptail --title 'USB Drive Missing' \