mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Merge pull request #1996 from MilhouseVH/le82_upgrade_single_shot
init: recover from a failed upgrade [Backport]
This commit is contained in:
commit
1ada221e6b
@ -772,8 +772,16 @@
|
||||
return 0
|
||||
fi
|
||||
|
||||
# remove temporary folder if exist from previous run
|
||||
rm -fr "$UPDATE_DIR/.tmp" &>/dev/null
|
||||
if [ -d $UPDATE_DIR/.tmp ]; then
|
||||
echo "Failed update detected - performing recovery."
|
||||
echo ""
|
||||
do_cleanup
|
||||
StartProgress countdown "Normal startup in 10s... " 10 "NOW"
|
||||
return 0
|
||||
fi
|
||||
|
||||
mkdir -p $UPDATE_DIR/.tmp &>/dev/null
|
||||
sync
|
||||
|
||||
echo "UPGRADE IN PROGRESS"
|
||||
echo ""
|
||||
@ -786,7 +794,6 @@
|
||||
echo "Found new .tar archive"
|
||||
UPDATE_FILENAME="$UPDATE_TAR"
|
||||
StartProgress spinner "Extracting contents of archive... "
|
||||
mkdir -p $UPDATE_DIR/.tmp &>/dev/null
|
||||
tar -xf "$UPDATE_TAR" -C $UPDATE_DIR/.tmp 1>/dev/null 2>/tmp/tarresult.txt || TARRESULT="1"
|
||||
|
||||
if [ "${TARRESULT}" -eq "0" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user