init: add compatmode

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-06-28 17:38:22 +02:00
parent a3bf814b26
commit 46f750bab2
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,14 @@
[[ -z "${ARC_PATH}" || ! -d "${ARC_PATH}/include" ]] && ARC_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")/../" 2>/dev/null && pwd)"
. ${ARC_PATH}/include/functions.sh
###############################################################################
# Compatibility boot
function compatboot () {
# Remove old Addons
if arrayExistItem "amepatch:" $(readConfigMap "addons" "${USER_CONFIG_FILE}"); then
deleteConfigKey "addons.amepatch" "${USER_CONFIG_FILE}"
fi
return 0
}

View File

@ -5,6 +5,7 @@ set -e
. ${ARC_PATH}/include/functions.sh
. ${ARC_PATH}/include/addons.sh
. ${ARC_PATH}/include/compat.sh
[ -z "${LOADER_DISK}" ] && die "Loader Disk not found!"
@ -77,6 +78,9 @@ initConfigKey "synoinfo" "{}" "${USER_CONFIG_FILE}"
initConfigKey "time" "{}" "${USER_CONFIG_FILE}"
initConfigKey "zimage-hash" "" "${USER_CONFIG_FILE}"
# Check for compatibility
compatboot
# Init Network
ETHX="$(ls /sys/class/net/ 2>/dev/null | grep eth)"
if arrayExistItem "sortnetif:" $(readConfigMap "addons" "${USER_CONFIG_FILE}"); then