Skip to content

Commit 5bc49ef

Browse files
committed
tree: add sanity checks
Signed-off-by: AuxXxilium <[email protected]>
1 parent 84f1f56 commit 5bc49ef

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

files/initrd/opt/arc/arc-functions.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3837,7 +3837,8 @@ function recoverDSM() {
38373837

38383838
# Check if BACKUP_CONFIG exists before proceeding
38393839
if [ ! -f "${BACKUP_CONFIG}" ]; then
3840-
umount "${TMP_PATH}/mdX"
3840+
sleep 3
3841+
umount -f "${TMP_PATH}/mdX"
38413842
break && return
38423843
fi
38433844

@@ -3860,6 +3861,7 @@ function recoverDSM() {
38603861
resetBuild
38613862
break
38623863
fi
3864+
sleep 3
38633865
umount -f "${TMP_PATH}/mdX" 2>/dev/null
38643866
done
38653867
if [ -f "${USER_CONFIG_FILE}" ]; then

files/initrd/opt/arc/include/update.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ function updateLoader() {
8787
sleep 3
8888
exec reboot
8989
fi
90+
else
91+
rm -f "${TMP_PATH}/update.zip"
9092
fi
9193

9294
# Create the update directory and log file
@@ -276,6 +278,7 @@ function upgradeLoader() {
276278
exec reboot
277279
fi
278280
else
281+
rm -f "${TMP_PATH}/arc.img.zip"
279282
dialog --backtitle "$(backtitle)" --title "Upgrade Loader" --aspect 18 \
280283
--infobox "Upgrade failed!\nTry again later." 0 0
281284
sleep 3

0 commit comments

Comments
 (0)