Skip to content

Commit

Permalink
Merge pull request #5638 from AuxXxilium/dev
Browse files Browse the repository at this point in the history
arc-functions: fix logic
  • Loading branch information
AuxXxilium authored Jan 8, 2025
2 parents 5c4a706 + 48b1443 commit 710e1d9
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions files/initrd/opt/arc/arc-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -822,15 +822,20 @@ function backupMenu() {
(
mkdir -p "${TMP_PATH}/mdX"
for I in ${DSMROOTS}; do
# fixDSMRootPart "${I}"
mount -t ext4 "${I}" "${TMP_PATH}/mdX"
[ $? -ne 0 ] && continue
if [ -f "${PART2_PATH}/machine.key" ]; then
cp -f "${PART2_PATH}/machine.key" "${TMP_PATH}/mdX/usr/arc/backup/p2/machine.key"
BACKUPKEY="true"
sync
fi
umount "${TMP_PATH}/mdX"
while true; do
# fixDSMRootPart "${I}"
mount -t ext4 "${I}" "${TMP_PATH}/mdX"
if [ -f "${PART2_PATH}/machine.key" ]; then
mkdir -p "${TMP_PATH}/mdX/usr/arc/backup/p2"
cp -f "${PART2_PATH}/machine.key" "${TMP_PATH}/mdX/usr/arc/backup/p2/machine.key"
if [ -f "${TMP_PATH}/mdX/usr/arc/backup/p2/machine.key" ]; then
BACKUPKEY="true"
sync
break
fi
fi
umount "${TMP_PATH}/mdX"
done
done
rm -rf "${TMP_PATH}/mdX" >/dev/null
) 2>&1 | dialog --backtitle "$(backtitle)" --title "Backup Encrytion Key" \
Expand Down

0 comments on commit 710e1d9

Please sign in to comment.