diff --git a/plugin/plugins/dynamix.unraid.net.plg b/plugin/plugins/dynamix.unraid.net.plg index 111afb6ca..0f7c60d37 100755 --- a/plugin/plugins/dynamix.unraid.net.plg +++ b/plugin/plugins/dynamix.unraid.net.plg @@ -442,6 +442,12 @@ preserveAction() { fi } +# Check if upgradepkg does not exist and copy upgradepkg- to the path if it does not +if [[ ! -f /sbin/upgradepkg ]]; then + echo "upgradepkg not found, restoring from backup" + cp -f /sbin/upgradepkg- /sbin/upgradepkg +fi + # Loop through the array of preserveFilesDirs and perform actions for obj in "${preserveFilesDirs[@]}" do