remove update file and reboot in normal mode when update file is corrupted
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
parent
e6d932c8c7
commit
320c699689
|
@ -18,8 +18,8 @@ case "$1" in
|
||||||
for file in ${updates} ; do
|
for file in ${updates} ; do
|
||||||
swupdate -i "${file}"
|
swupdate -i "${file}"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
menu &
|
notif_disp 10 " CORRUPTED^ UPDATE FILE"
|
||||||
exit 1
|
rm -f "${file}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
notif "^^^^^^^^ RESTARTING...^^^^^^^^"
|
notif "^^^^^^^^ RESTARTING...^^^^^^^^"
|
||||||
|
|
|
@ -139,8 +139,10 @@ menu_run () {
|
||||||
for file in $(ls /mnt/FunKey-*.fwu); do
|
for file in $(ls /mnt/FunKey-*.fwu); do
|
||||||
swupdate -i "${file}"
|
swupdate -i "${file}"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
notif "${message}...^CANNOT UPDATE!"
|
notif_disp 10 "${message}...^ CORRUPTED^ UPDATE FILE"
|
||||||
break
|
rm -f "${file}"
|
||||||
|
notif "^^^^^^^^ RESTARTING...^^^^^^^^"
|
||||||
|
normal_mode
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
message=" USB MOUNT"
|
message=" USB MOUNT"
|
||||||
|
|
Loading…
Reference in New Issue