From 132dcb234425770045780592c1726828cecf6719 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Tue, 28 Jan 2020 20:44:34 -0600 Subject: [PATCH] flash-gui: set unset variable USB_FAILED Not setting USB_FAILED when call to mount-usb succeeds results in a spurious 'sh: 0 unknown operand' error printed to console. Signed-off-by: Matt DeVillier --- initrd/bin/flash-gui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/initrd/bin/flash-gui.sh b/initrd/bin/flash-gui.sh index dba97d40..8a4e05b9 100755 --- a/initrd/bin/flash-gui.sh +++ b/initrd/bin/flash-gui.sh @@ -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' \