arc-functions: rework addons

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-10-25 15:16:52 +02:00
parent 905131ae8e
commit 7ea1888c93

View File

@ -72,6 +72,14 @@ function addonSelection() {
writeConfigKey "addons.\"${ADDON}\"" "" "${USER_CONFIG_FILE}"
done
ADDONSINFO="$(readConfigEntriesArray "addons" "${USER_CONFIG_FILE}")"
if readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "sortnetif"; then
MACLIST=""
for ETH in ${ETHX}; do
MAC="$(cat /sys/class/net/${ETH}/address | sed 's/://g' | tr '[:lower:]' '[:upper:]')"
MACLIST="${MACLIST} ${MAC}"
done
writeConfigKey "addons.sortnetif" "${MACLIST// /,}" "${USER_CONFIG_FILE}"
fi
dialog --backtitle "$(backtitle)" --title "DSM Addons" \
--msgbox "DSM Addons selected:\n${ADDONSINFO}" 7 70
}