summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/action/update.sh7
1 files changed, 4 insertions, 3 deletions
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
}