File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1375,8 +1375,16 @@ else
13751375 # We are not running in QEMU, so flash the key to ROM
13761376
13771377 # # flash generated key to ROM
1378- echo -e " \nReading current firmware...\n(this may take up to two minutes...)\n"
1379- /bin/flash.sh -r /tmp/oem-setup.rom > /dev/null 2> /tmp/error
1378+ # read current firmware; show all output and capture stderr for errors
1379+ if echo " $CONFIG_FLASH_OPTIONS " | grep -q -- ' --progress' ; then
1380+ echo -e " \nReading current firmware (progress shown below)...\n"
1381+ else
1382+ echo -e " \nReading current firmware...\n(this may take up to two minutes...)\n"
1383+ fi
1384+ if ! /bin/flash.sh -r /tmp/oem-setup.rom 2> >( tee /tmp/error >&2 ) ; then
1385+ ERROR=$( tail -n 1 /tmp/error | fold -s)
1386+ whiptail_error_die " Error reading current firmware:\n\n$ERROR "
1387+ fi
13801388 if [ ! -s /tmp/oem-setup.rom ]; then
13811389 ERROR=$( tail -n 1 /tmp/error | fold -s)
13821390 whiptail_error_die " Error reading current firmware:\n\n$ERROR "
You can’t perform that action at this time.
0 commit comments