mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-24 00:59:53 +07:00
arc: rework ui
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
39f119c123
commit
d48a970cd8
@ -280,11 +280,12 @@ function arcVersion() {
|
||||
PVS="$(readConfigEntriesArray "${PLATFORM}.\"${MODEL}\"" "${D_FILE}" | sort -r)"
|
||||
echo -n "" >"${TMP_PATH}/versions"
|
||||
while read -r V; do
|
||||
if [ "${V:0:3}" != "${PRODUCTVER}" ]; then
|
||||
if [ "${V:0:3}" != "${PRODUCTVER}" ] || [ "${V}" == "${PREV}" ]; then
|
||||
continue
|
||||
else
|
||||
echo "${V}" >>"${TMP_PATH}/versions"
|
||||
fi
|
||||
PREV="${V}"
|
||||
done < <(echo "${PVS}")
|
||||
DSMPVS="$(cat ${TMP_PATH}/versions)"
|
||||
dialog --backtitle "$(backtitlep)" --colors --title "DSM Version" \
|
||||
@ -355,13 +356,13 @@ function arcVersion() {
|
||||
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}"
|
||||
else
|
||||
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.cpufreqscaling" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "addons.powersched" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "addons.sensors" "" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
@ -426,7 +427,6 @@ function arcPatch() {
|
||||
writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
elif [ "${ARCMODE}" == "config" ]; then
|
||||
if [ -n "${ARCCONF}" ]; then
|
||||
dialog --clear --backtitle "$(backtitlep)" \
|
||||
--nocancel --title "SN/Mac Options"\
|
||||
--menu "Choose an Option." 7 60 0 \
|
||||
@ -436,16 +436,6 @@ function arcPatch() {
|
||||
2>"${TMP_PATH}/resp"
|
||||
resp=$(cat ${TMP_PATH}/resp)
|
||||
[ -z "${resp}" ] && return 1
|
||||
else
|
||||
dialog --clear --backtitle "$(backtitlep)" \
|
||||
--nocancel --title "SN/Mac Options"\
|
||||
--menu "Choose an Option." 7 60 0 \
|
||||
2 "Use random SN/Mac (Reduced DSM Features)" \
|
||||
3 "Use my own SN/Mac (Be sure your Data is valid)" \
|
||||
2>"${TMP_PATH}/resp"
|
||||
resp=$(cat ${TMP_PATH}/resp)
|
||||
[ -z "${resp}" ] && return 1
|
||||
fi
|
||||
if [ ${resp} -eq 1 ]; then
|
||||
[ -z "${ARCCONF}" ] && decryptMenu || true
|
||||
if [ -n "${ARCCONF}" ]; then
|
||||
@ -538,12 +528,10 @@ function arcSettings() {
|
||||
fi
|
||||
if [ "${ARCMODE}" == "config" ]; then
|
||||
# Check for DT and HBA/Raid Controller
|
||||
if [ "${PLATFORM}" != "epyc7002" ]; then
|
||||
if [ "${DT}" == "true" ] && [ "${EXTERNALCONTROLLER}" == "true" ]; then
|
||||
dialog --backtitle "$(backtitlep)" --title "Arc Warning" \
|
||||
--msgbox "WARN: You use a HBA/Raid Controller and selected a DT Model.\nThis is still an experimental." 6 70
|
||||
fi
|
||||
fi
|
||||
# Check for more then 8 Ethernet Ports
|
||||
DEVICENIC="$(readConfigKey "device.nic" "${USER_CONFIG_FILE}")"
|
||||
MODELNIC="$(readConfigKey "${MODEL}.ports" "${S_FILE}" 2>/dev/null)"
|
||||
@ -651,12 +639,12 @@ function arcSummary() {
|
||||
fi
|
||||
# Print Summary
|
||||
SUMMARY="\Z4> DSM Information\Zn"
|
||||
SUMMARY+="\n>> DSM Model: \Zb${MODEL}\Zn"
|
||||
SUMMARY+="\n>> DSM Version: \Zb${PRODUCTVER}\Zn"
|
||||
SUMMARY+="\n>> DSM Platform: \Zb${PLATFORM}\Zn"
|
||||
SUMMARY+="\n>> DSM DT: \Zb${DT}\Zn"
|
||||
SUMMARY+="\n>> DSM PAT URL: \Zb${PAT_URL}\Zn"
|
||||
SUMMARY+="\n>> DSM PAT Hash: \Zb${PAT_HASH}\Zn"
|
||||
SUMMARY+="\n>> Model: \Zb${MODEL}\Zn"
|
||||
SUMMARY+="\n>> Version: \Zb${PRODUCTVER}\Zn"
|
||||
SUMMARY+="\n>> Platform: \Zb${PLATFORM}\Zn"
|
||||
SUMMARY+="\n>> DT: \Zb${DT}\Zn"
|
||||
SUMMARY+="\n>> PAT URL: \Zb${PAT_URL}\Zn"
|
||||
SUMMARY+="\n>> PAT Hash: \Zb${PAT_HASH}\Zn"
|
||||
[ "${MODEL}" == "SA6400" ] && SUMMARY+="\n>> Kernel: \Zb${KERNEL}\Zn"
|
||||
SUMMARY+="\n>> Kernel Version: \Zb${KVER}\Zn"
|
||||
SUMMARY+="\n"
|
||||
|
@ -6,14 +6,15 @@ function availableAddons() {
|
||||
echo ""
|
||||
return 1
|
||||
fi
|
||||
ARCOFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
|
||||
ARCCONF="$(readConfigKey "${MODEL}.serial" "${S_FILE}")"
|
||||
local ARCOFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
|
||||
local ARCCONF="$(readConfigKey "${MODEL}.serial" "${S_FILE}")"
|
||||
local PAT_URL="$(readConfigKey "paturl" "${USER_CONFIG_FILE}")"
|
||||
for D in $(find "${ADDONS_PATH}" -maxdepth 1 -type d 2>/dev/null | sort); do
|
||||
[ ! -f "${D}/manifest.yml" ] && continue
|
||||
ADDON=$(basename ${D})
|
||||
AVAILABLE="$(readConfigKey "${1}" "${D}/manifest.yml")"
|
||||
local ADDON=$(basename ${D})
|
||||
local AVAILABLE="$(readConfigKey "${1}" "${D}/manifest.yml")"
|
||||
[ "${AVAILABLE}" = false ] && continue
|
||||
SYSTEM=$(readConfigKey "system" "${D}/manifest.yml")
|
||||
local SYSTEM=$(readConfigKey "system" "${D}/manifest.yml")
|
||||
[ "${SYSTEM}" = true ] && continue
|
||||
if [[ "${ARCOFFLINE}" == "true" || -z "${ARCCONF}" ]] && [[ "${ADDON}" == "amepatch" || "${ADDON}" == "arcdns" ]]; then
|
||||
continue
|
||||
@ -21,9 +22,14 @@ function availableAddons() {
|
||||
if [ "${MACHINE}" != "Native" ] && [ "${ADDON}" == "cpufreqscaling" ]; then
|
||||
continue
|
||||
fi
|
||||
DESC="$(readConfigKey "description" "${D}/manifest.yml")"
|
||||
BETA="$(readConfigKey "beta" "${D}/manifest.yml")"
|
||||
TARGET="$(readConfigKey "target" "${D}/manifest.yml")"
|
||||
if [ "${ADDON}" == "allowdowngrade" ]; then
|
||||
if [ $(echo "${PAT_URL}" 2>/dev/null | grep -q "7.2.2" | wc -l) -eq 0 ]; then
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
local DESC="$(readConfigKey "description" "${D}/manifest.yml")"
|
||||
local BETA="$(readConfigKey "beta" "${D}/manifest.yml")"
|
||||
local TARGET="$(readConfigKey "target" "${D}/manifest.yml")"
|
||||
[ "${BETA}" = true ] && BETA="(Beta) " || BETA=""
|
||||
if [ "${TARGET}" == "app" ]; then
|
||||
[ "${AVAILABLE}" = true ] && echo -e "${ADDON}\t\Z4${BETA}${DESC}\Zn"
|
||||
|
Loading…
Reference in New Issue
Block a user