tree: rewrite more addon related

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-09-21 11:54:58 +02:00
parent e42305bc48
commit 76730b1063
2 changed files with 4 additions and 3 deletions

View File

@ -41,6 +41,7 @@ function addonSelection() {
ARCCONF="$(readConfigKey "${MODEL}.serial" "${S_FILE}")"
ADDONS="$(readConfigKey "addons" "${USER_CONFIG_FILE}")"
DEVICENIC="$(readConfigKey "device.nic" "${USER_CONFIG_FILE}")"
PAT_URL="$(readConfigKey "paturl" "${USER_CONFIG_FILE}")"
if [ "${ADDONS}" = "{}" ]; then
initConfigKey "addons.acpid" "" "${USER_CONFIG_FILE}"
initConfigKey "addons.cpuinfo" "" "${USER_CONFIG_FILE}"
@ -61,10 +62,10 @@ function addonSelection() {
initConfigKey "addons.powersched" "" "${USER_CONFIG_FILE}"
initConfigKey "addons.sensors" "" "${USER_CONFIG_FILE}"
fi
if grep -q "i915" lsmod; then
if echo "$(lsmod)" 2>/dev/null | grep -q "i915" && [[ "${PLATFORM}" == "apollolake" || "${PLATFORM}" == "geminilake" ]]; then
initConfigKey "addons.i915" "" "${USER_CONFIG_FILE}"
fi
if grep -q "7.2.2" $(readConfigKey "paturl" "${USER_CONFIG_FILE}"); then
if echo "${PAT_URL}" 2>/dev/null | grep -q "7.2.2"; then
initConfigKey "addons.allowdowngrade" "" "${USER_CONFIG_FILE}"
fi
if [ ${DEVICENIC} -gt 1 ]; then

View File

@ -898,7 +898,7 @@ if [ "${AUTOMATED}" == "true" ]; then
make
fi
else
[ "${BUILDDONE}" == "true" ] && NEXT="3" || NEXT="1"
[ "${BUILDDONE}" == "true" ] && NEXT="3" || [ "${CONFDONE}" == "true" ] && NEXT="2" || NEXT="1"
while true; do
echo "= \"\Z4========== Main ==========\Zn \" " >"${TMP_PATH}/menu"
if [ -z "${ARCKEY}" ] && [ "${OFFLINE}" == "false" ]; then