fix: restore upgradepkg before install

This commit is contained in:
Eli Bosley
2024-12-12 10:40:14 -05:00
parent dab6985297
commit 8f5814589e

View File

@@ -695,6 +695,11 @@ if [[ -n "${ADDTEXT1}" || -n "${ADDTEXT2}" || -n "${ADDTEXT3}" ]]; then
mv "${TMP}" "${FILE}"
fi
# Restore the upgradepkg binary if it exists and the original does not
if [[ -f /sbin/upgradepkg- && ! -f /sbin/upgradepkg ]]; then
cp -f /sbin/upgradepkg- /sbin/upgradepkg
fi
# install the main txz
upgradepkg --install-new --reinstall "${MAINTXZ}"