mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-24 01:39:52 +07:00
init: add compatmode
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
a3bf814b26
commit
46f750bab2
14
files/initrd/opt/arc/include/compat.sh
Executable file
14
files/initrd/opt/arc/include/compat.sh
Executable 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
|
||||
}
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user