diff --git a/files/initrd/opt/arc/include/update.sh b/files/initrd/opt/arc/include/update.sh index d4ec6d81..c6c6a268 100755 --- a/files/initrd/opt/arc/include/update.sh +++ b/files/initrd/opt/arc/include/update.sh @@ -430,8 +430,9 @@ function updateLKMs() { function updateOffline() { local ARCOFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")" if [ "${ARCOFFLINE}" != "true" ]; then - rm -f "${CONFIGS_PATH}/offline.json" + cp -f "${CONFIGS_PATH}/offline.json" "${CONFIGS_PATH}/offline.json.bak" curl -skL "https://autoupdate.synology.com/os/v2" -o "${CONFIGS_PATH}/offline.json" + [ ! -f "${CONFIGS_PATH}/offline.json" ] && cp -f "${CONFIGS_PATH}/offline.json.bak" "${CONFIGS_PATH}/offline.json" fi return 0 }