From e4b10cd7190fc904a971089d7122de0f27569297 Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Sun, 12 May 2024 16:23:28 +0200 Subject: [PATCH] arc: only force copy if old dsm files are not found Signed-off-by: AuxXxilium --- files/initrd/opt/arc/arc.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/files/initrd/opt/arc/arc.sh b/files/initrd/opt/arc/arc.sh index 7da229bb..191cf7e4 100755 --- a/files/initrd/opt/arc/arc.sh +++ b/files/initrd/opt/arc/arc.sh @@ -770,15 +770,17 @@ function make() { fi fi # Copy DSM Files to Locations if DSM Files not found - if copyDSMFiles "${UNTAR_PAT_PATH}"; then - dialog --backtitle "$(backtitle)" --title "DSM Copy" --aspect 18 \ - --infobox "DSM Copy successful!" 0 0 - rm -rf "${UNTAR_PAT_PATH}" - else - dialog --backtitle "$(backtitle)" --title "DSM Copy" --aspect 18 \ - --infobox "DSM Copy failed!\nExit." 0 0 - sleep 5 - return 1 + if [ ! -f "${ORI_ZIMAGE_FILE}" ] || [ ! -f "${ORI_RDGZ_FILE}" ]; then + if copyDSMFiles "${UNTAR_PAT_PATH}"; then + dialog --backtitle "$(backtitle)" --title "DSM Copy" --aspect 18 \ + --infobox "DSM Copy successful!" 0 0 + rm -rf "${UNTAR_PAT_PATH}" + else + dialog --backtitle "$(backtitle)" --title "DSM Copy" --aspect 18 \ + --infobox "DSM Copy failed!\nExit." 0 0 + sleep 5 + return 1 + fi fi ( livepatch