Skip to content

Commit

Permalink
arc: rework more
Browse files Browse the repository at this point in the history
Signed-off-by: AuxXxilium <[email protected]>
  • Loading branch information
AuxXxilium committed Aug 26, 2024
1 parent d6609e1 commit acfe28f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
4 changes: 2 additions & 2 deletions files/initrd/opt/arc/arc-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ function addonSelection() {
done
ADDONSINFO="$(readConfigEntriesArray "addons" "${USER_CONFIG_FILE}")"
if [ "${NANOVER}" == "2" ]; then
ADDONSINFO+="\nWarning: DSM 7.2.2 isn't supported by all Addons!"
ADDONSINFO+="\n\nWARN: DSM 7.2.2 isn't supported by app-specific Addons!"
dialog --backtitle "$(backtitle)" --title "DSM Addons" \
--msgbox "DSM Addons selected:\n${ADDONSINFO}" 10 50
--msgbox "DSM Addons selected:\n${ADDONSINFO}" 10 60
else
dialog --backtitle "$(backtitle)" --title "DSM Addons" \
--msgbox "DSM Addons selected:\n${ADDONSINFO}" 7 50
Expand Down
31 changes: 21 additions & 10 deletions files/initrd/opt/arc/arc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -287,17 +287,28 @@ function arcVersion() {
[ $? -ne 0 ] && return 0
resp=$(cat ${TMP_PATH}/resp)
[ -z "${resp}" ] && return 1
if [ "${PRODUCTVER}" != "${resp}" ]; then
if [ "${resp}" == "7.2" ]; then
dialog --backtitle "$(backtitle)" --title "DSM Version" \
--menu "Choose a DSM Version?\n* Recommended Option" 8 40 0 \
1 "DSM 7.2.1 (Stable) *" \
2 "DSM 7.2.2 (Experimental)" \
2>"${TMP_PATH}/resp"
[ $? -ne 0 ] && return 1
resp=$(cat ${TMP_PATH}/resp)
[ -z "${resp}" ] && return 1
if [ ${resp} -eq 1 ]; then
resp="7.2"
respnano="1"
elif [ ${resp} -eq 2 ]; then
resp="7.2"
respnano="2"
fi
fi
if [ "${PRODUCTVER}" != "${resp}" ] || [ "${NANOVER}" != "${respnano}" ]; then
writeConfigKey "confdone" "false" "${USER_CONFIG_FILE}"
PRODUCTVER="${resp}"
if [ "${PRODUCTVER}" == "7.2.2" ]; then
PRODUCTVER="7.2"
NANOVER="2"
elif [ "${PRODUCTVER}" == "7.2.1" ]; then
PRODUCTVER="7.2"
NANOVER="1"
fi
writeConfigKey "productver" "${PRODUCTVER}" "${USER_CONFIG_FILE}"
NANOVER="${respnano}"
writeConfigKey "nanover" "${NANOVER}" "${USER_CONFIG_FILE}"
# Delete old files
rm -f "${ORI_ZIMAGE_FILE}" "${ORI_RDGZ_FILE}" "${MOD_ZIMAGE_FILE}" "${MOD_RDGZ_FILE}" 2>/dev/null || true
Expand Down Expand Up @@ -665,8 +676,8 @@ function make() {
# Get PAT Data
dialog --backtitle "$(backtitle)" --colors --title "Arc Build" \
--infobox "Get PAT Data from Local File..." 3 40
PAT_URL="$(readConfigKey "\"${MODEL}\".\"${PRODUCTVER}\".url" "${D_FILE}")"
PAT_HASH="$(readConfigKey "\"${MODEL}\".\"${PRODUCTVER}\".hash" "${D_FILE}")"
PAT_URL="$(readConfigKey "\"${MODEL}\".\"${PRODUCTVER}.${NANOVER}\".url" "${D_FILE}")"
PAT_HASH="$(readConfigKey "\"${MODEL}\".\"${PRODUCTVER}.${NANOVER}\".hash" "${D_FILE}")"
VALID="true"
else
# Get PAT Data
Expand Down

0 comments on commit acfe28f

Please sign in to comment.