mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-23 23:49:52 +07:00
restore: rewrite logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
c72a0fd713
commit
2fbfef5178
@ -682,7 +682,7 @@ function backupMenu() {
|
||||
NEXT="1"
|
||||
while true; do
|
||||
dialog --backtitle "$(backtitle)" --cancel-label "Exit" --menu "Choose an Option" 0 0 0 \
|
||||
1 "Restore and Build Arc Config from DSM" \
|
||||
1 "Restore Arc Config from DSM" \
|
||||
2 "Restore HW Encryption Key from DSM" \
|
||||
3 "Backup HW Encryption Key to DSM" \
|
||||
2>"${TMP_PATH}/resp"
|
||||
@ -740,10 +740,10 @@ function backupMenu() {
|
||||
done < <(getAllModules "${PLATFORM}" "${KVERP}")
|
||||
fi
|
||||
dialog --backtitle "$(backtitle)" --title "Restore Arc Config" \
|
||||
--aspect 18 --msgbox "Config restore successful!\nBuild now..." 0 0
|
||||
--aspect 18 --msgbox "Config restore successful!\nDownloading necessary files..." 0 0
|
||||
sleep 2
|
||||
ARCMODE="automated"
|
||||
writeConfigKey "arc.mode" "${ARCMODE}" "${USER_CONFIG_FILE}"
|
||||
ARCRESTORE="true"
|
||||
arcVersion
|
||||
fi
|
||||
;;
|
||||
|
@ -458,6 +458,7 @@ function arcVersion() {
|
||||
fi
|
||||
# Cleanup
|
||||
[ -d "${UNTAR_PAT_PATH}" ] && rm -rf "${UNTAR_PAT_PATH}"
|
||||
[ "${ARCRESTORE}" == "true" ] && return 0 && ARCRESTORE="false" || true
|
||||
# Change Config if Files are valid
|
||||
if [ "${VALID}" == "true" ] && [ -f "${ORI_ZIMAGE_FILE}" ] && [ -f "${ORI_RDGZ_FILE}" ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Arc Config" \
|
||||
|
Loading…
Reference in New Issue
Block a user