From 37ec7327dbd692a6969bcc556c0f3758ad3dda91 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 06 Nov 2015 00:37:56 -0500 Subject: do_update(): Fix error handling What idiot messed up this return logic? --- diff --git a/src/action/update.sh b/src/action/update.sh index 477300f..b0e228d 100644 --- a/src/action/update.sh +++ b/src/action/update.sh @@ -130,9 +130,7 @@ do_update() # Write the ROM to flash. info 'Installing new firmware...' - if flashrom_write "$(board_get_chip)"; then - info 'Firmware installation complete' - sleep 5 + if ! flashrom_write "$(board_get_chip)"; then rm_temp 'rom' return 1 fi @@ -140,5 +138,8 @@ do_update() # Clean up the ROM. rm_temp 'rom' + info 'Firmware installation complete' + sleep 5 + return 0 } -- cgit v0.9.1