mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-23 23:59:53 +07:00
tree: update addons selection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
d9b3367a8a
commit
e42305bc48
@ -39,6 +39,42 @@ function addonSelection() {
|
||||
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
|
||||
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
|
||||
ARCCONF="$(readConfigKey "${MODEL}.serial" "${S_FILE}")"
|
||||
ADDONS="$(readConfigKey "addons" "${USER_CONFIG_FILE}")"
|
||||
DEVICENIC="$(readConfigKey "device.nic" "${USER_CONFIG_FILE}")"
|
||||
if [ "${ADDONS}" = "{}" ]; then
|
||||
initConfigKey "addons.acpid" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "addons.cpuinfo" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "addons.storagepanel" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "addons.updatenotify" "" "${USER_CONFIG_FILE}"
|
||||
if [ ${NVMEDRIVES} -gt 0 ]; then
|
||||
if [ "${PLATFORM}" == "epyc7002" ] && [ ${SATADRIVES} -eq 0 ]; then
|
||||
initConfigKey "addons.nvmesystem" "" "${USER_CONFIG_FILE}"
|
||||
elif [ "${MODEL}" == "DS918+" ] || [ "${MODEL}" == "DS1019+" ] || [ "${MODEL}" == "DS1621xs+" ] || [ "${MODEL}" == "RS1619xs+" ]; then
|
||||
initConfigKey "addons.nvmecache" "" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
initConfigKey "addons.nvmevolume" "" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
if [ "${CPUFREQ}" == "true" ] && [ "${ACPISYS}" == "true" ]; then
|
||||
initConfigKey "addons.cpufreqscaling" "" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
if [ "${MACHINE}" == "Native" ]; then
|
||||
initConfigKey "addons.powersched" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "addons.sensors" "" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
if grep -q "i915" lsmod; then
|
||||
initConfigKey "addons.i915" "" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
if grep -q "7.2.2" $(readConfigKey "paturl" "${USER_CONFIG_FILE}"); then
|
||||
initConfigKey "addons.allowdowngrade" "" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
if [ ${DEVICENIC} -gt 1 ]; then
|
||||
initConfigKey "addons.multismb3" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "addons.sortnetif" "" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
if [ "${ARCCONF}" == "true" ]; then
|
||||
initConfigKey "addons.arcdns" "" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
fi
|
||||
# read addons from user config
|
||||
unset ADDONS
|
||||
declare -A ADDONS
|
||||
@ -57,8 +93,8 @@ function addonSelection() {
|
||||
echo -e "${ADDON} \"${DESC}\" ${ACT}" >>"${TMP_PATH}/opts"
|
||||
fi
|
||||
done < <(availableAddons "${PLATFORM}")
|
||||
dialog --backtitle "$(backtitle)" --title "DSM Addons" --aspect 18 \
|
||||
--checklist "Select DSM Addons to include.\nPlease read Wiki before choosing anything.\nSelect with SPACE, Confirm with ENTER!" 0 0 0 \
|
||||
dialog --backtitle "$(backtitle)" --title "DSM Addons" --colors --aspect 18 \
|
||||
--checklist "Select DSM Addons to include.\nAddons: \Z1System Addon\Zn \Z4App Addon\Zn\nSelect with SPACE, Confirm with ENTER!" 0 0 0 \
|
||||
--file "${TMP_PATH}/opts" 2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && return 1
|
||||
resp=$(cat ${TMP_PATH}/resp)
|
||||
|
@ -15,8 +15,15 @@ function availableAddons() {
|
||||
[ "${SYSTEM}" = true ] && continue
|
||||
DESC="$(readConfigKey "description" "${D}/manifest.yml")"
|
||||
BETA="$(readConfigKey "beta" "${D}/manifest.yml")"
|
||||
TARGET="$(readConfigKey "target" "${D}/manifest.yml")"
|
||||
[ "${BETA}" = true ] && BETA="(Beta) " || BETA=""
|
||||
[ "${AVAILABLE}" = true ] && echo -e "${ADDON}\t${BETA}${DESC}"
|
||||
if [ "${TARGET}" == "app" ]; then
|
||||
[ "${AVAILABLE}" = true ] && echo -e "${ADDON}\t\Z4${BETA}${DESC}\Zn"
|
||||
elif [ "${TARGET}" == "system" ]; then
|
||||
[ "${AVAILABLE}" = true ] && echo -e "${ADDON}\t\Z1${BETA}${DESC}\Zn"
|
||||
else
|
||||
[ "${AVAILABLE}" = true ] && echo -e "${ADDON}\t${BETA}${DESC}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -84,9 +84,6 @@ if grep -q "automated_arc" /proc/cmdline; then
|
||||
writeConfigKey "automated" "true" "${USER_CONFIG_FILE}"
|
||||
else
|
||||
writeConfigKey "automated" "false" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "addons.acpid" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "addons.cpuinfo" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "addons.storagepanel" "" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
[ -f "${PART3_PATH}/automated" ] && rm -f "${PART3_PATH}/automated" >/dev/null 2>&1 || true
|
||||
if [ -f "${PART1_PATH}/ARC-BRANCH" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user