arc: full reset config if model is changed
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
@@ -259,6 +259,11 @@ function arcModel() {
|
||||
writeConfigKey "addons" "{}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.confdone" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.custom" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.hddsort" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.kernel" "official" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.odp" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.paturl" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.pathash" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.remap" "" "${USER_CONFIG_FILE}"
|
||||
@@ -267,7 +272,10 @@ function arcModel() {
|
||||
writeConfigKey "modelid" "${MODELID}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "platform" "${PLATFORM}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "productver" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "ramdisk-hash" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "synoinfo" "{}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "zimage-hash" "" "${USER_CONFIG_FILE}"
|
||||
CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
rm -f "${ORI_ZIMAGE_FILE}" "${ORI_RDGZ_FILE}" "${MOD_ZIMAGE_FILE}" "${MOD_RDGZ_FILE}" >/dev/null 2>&1 || true
|
||||
|
||||
@@ -106,7 +106,6 @@ ETHN=$(ls /sys/class/net/ 2>/dev/null | grep eth | wc -l)
|
||||
[ ${NIC} -ne ${ETHN} ] && echo -e "\033[1;31mWarning: NIC mismatch (NICs: ${NIC} | Real: ${ETHN})\033[0m"
|
||||
# Write NIC Amount to config
|
||||
writeConfigKey "device.nic" "${NIC}" "${USER_CONFIG_FILE}"
|
||||
deleteConfigKey "arc.nic" "${USER_CONFIG_FILE}"
|
||||
# No network devices
|
||||
echo
|
||||
[ ${NIC} -le 0 ] && die "No NIC found! - Loader does not work without Network connection."
|
||||
@@ -193,8 +192,7 @@ for ETH in ${ETHX}; do
|
||||
echo -e "\r\033[1;37m${DRIVER} (${SPEED} | ${MSG}):\033[0m LINK LOCAL (No DHCP server detected.)"
|
||||
else
|
||||
echo -e "\r\033[1;37m${DRIVER} (${SPEED} | ${MSG}):\033[0m Access \033[1;34mhttp://${IP}:7681\033[0m to connect to Arc via web."
|
||||
ARCNIC="$(readConfigKey "arc.nic" "${USER_CONFIG_FILE}")"
|
||||
[ -z "${ARCNIC}" ] && writeConfigKey "arc.nic" "${ETH}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.nic" "${ETH}" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
ethtool -s ${ETH} wol g 2>/dev/null
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user