Skip to content

Commit

Permalink
Merge pull request #4738 from AuxXxilium/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
AuxXxilium authored Nov 17, 2024
2 parents f317e49 + 902db23 commit 7f9df8f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
3 changes: 2 additions & 1 deletion files/initrd/opt/arc/arc-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -693,8 +693,9 @@ function sequentialIOMenu() {
function backupMenu() {
NEXT="1"
USERID="$(readConfigKey "arc.userid" "${USER_CONFIG_FILE}")"
ARCOFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
while true; do
if [ -n "${USERID}" ]; then
if [ -n "${USERID}" ] && [ "${ARCOFFLINE}" != "true" ]; then
dialog --backtitle "$(backtitle)" --title "Backup" --cancel-label "Exit" --menu "Choose an Option" 0 0 0 \
1 "Restore Arc Config from DSM" \
2 "Restore HW Encryption Key from DSM" \
Expand Down
17 changes: 14 additions & 3 deletions files/initrd/opt/arc/arc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ function arcPatch() {
elif [ "${ARCMODE}" = "config" ]; then
dialog --clear --backtitle "$(backtitlep)" \
--nocancel --title "SN/Mac Options"\
--menu "Choose an Option." 7 60 0 \
--menu "Choose an Option" 7 60 0 \
1 "Use Arc Patch (AME, QC, Push Notify and more)" \
2 "Use random SN/Mac (Reduced DSM Features)" \
3 "Use my own SN/Mac (Be sure your Data is valid)" \
Expand All @@ -428,8 +428,19 @@ function arcPatch() {
[ -z "${resp}" ] && return 1
if [ ${resp} -eq 1 ]; then
ARCCONF="$(readConfigKey "${MODEL}.serial" "${S_FILE}")"
[ -n "${ARCCONF}" ] && SN="$(generateSerial "${MODEL}" "true")" || SN="$(generateSerial "${MODEL}" "false")"
[ -n "${ARCCONF}" ] && writeConfigKey "arc.patch" "true" "${USER_CONFIG_FILE}" || writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
if [ -n "${ARCCONF}" ]; then
dialog --backtitle "$(backtitlep)" --colors --title "Arc Patch" \
--infobox "Arc Patch successful!" 3 30
sleep 2
SN="$(generateSerial "${MODEL}" "true")"
writeConfigKey "arc.patch" "true" "${USER_CONFIG_FILE}"
else
dialog --backtitle "$(backtitlep)" --colors --title "Arc Patch" \
--infobox "Arc Patch failed!" 3 30
sleep 2
SN="$(generateSerial "${MODEL}" "false")"
writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
fi
elif [ ${resp} -eq 2 ]; then
# Generate random Serial
SN="$(generateSerial "${MODEL}" "false")"
Expand Down

0 comments on commit 7f9df8f

Please sign in to comment.