Skip to content

Commit 320c699

Browse files
committed
remove update file and reboot in normal mode when update file is corrupted
Signed-off-by: Michel-FK <[email protected]>
1 parent e6d932c commit 320c699

File tree

2 files changed

+6
-4
lines changed
  • Recovery/board/funkey/rootfs-overlay

2 files changed

+6
-4
lines changed

Recovery/board/funkey/rootfs-overlay/etc/init.d/S60recovery

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ case "$1" in
1818
for file in ${updates} ; do
1919
swupdate -i "${file}"
2020
if [ $? -ne 0 ]; then
21-
menu &
22-
exit 1
21+
notif_disp 10 " CORRUPTED^ UPDATE FILE"
22+
rm -f "${file}"
2323
fi
2424
done
2525
notif "^^^^^^^^ RESTARTING...^^^^^^^^"

Recovery/board/funkey/rootfs-overlay/usr/local/sbin/menu

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,10 @@ menu_run () {
139139
for file in $(ls /mnt/FunKey-*.fwu); do
140140
swupdate -i "${file}"
141141
if [ $? -ne 0 ]; then
142-
notif "${message}...^CANNOT UPDATE!"
143-
break
142+
notif_disp 10 "${message}...^ CORRUPTED^ UPDATE FILE"
143+
rm -f "${file}"
144+
notif "^^^^^^^^ RESTARTING...^^^^^^^^"
145+
normal_mode
144146
fi
145147
done
146148
message=" USB MOUNT"

0 commit comments

Comments
 (0)