tree: more rewrite

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-08-25 16:45:43 +02:00
parent 23187955dc
commit cc5ecd61c5
3 changed files with 7 additions and 5 deletions

View File

@ -51,6 +51,8 @@ function addonSelection() {
arrayExistItem "${ADDON}" "${!ADDONS[@]}" && ACT="on" || ACT="off"
if [[ "${ADDON}" == "amepatch" || "${ADDON}" == "sspatch" || "${ADDON}" == "arcdns" ]] && [ "${ARCPATCH}" == "false" ]; then
continue
elif [ "${ADDON}" == "cpufreqscaling" ] && [ "${CPUFREQ}" == "false" ]; then
continue
else
echo -e "${ADDON} \"${DESC}\" ${ACT}" >>"${TMP_PATH}/opts"
fi

View File

@ -932,15 +932,15 @@ else
echo "d \"Modules \" " >>"${TMP_PATH}/menu"
echo "e \"Version \" " >>"${TMP_PATH}/menu"
echo "p \"Patch Options (SN/Mac) \" " >>"${TMP_PATH}/menu"
if [ "${CPUFREQ}" == "true" ]; then
echo "g \"Frequency Scaling Governor\" " >>"${TMP_PATH}/menu"
fi
if [ "${DT}" == "false" ] && [ ${SATACONTROLLER} -gt 0 ]; then
echo "S \"Sata PortMap \" " >>"${TMP_PATH}/menu"
fi
if [ "${DT}" == "true" ]; then
echo "o \"DTS Map Options \" " >>"${TMP_PATH}/menu"
fi
if readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "cpufreqscaling"; then
echo "g \"Frequency Scaling Governor\" " >>"${TMP_PATH}/menu"
fi
if readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "storagepanel"; then
echo "P \"StoragePanel Options \" " >>"${TMP_PATH}/menu"
fi

View File

@ -33,8 +33,6 @@ LKM="$(readConfigKey "lkm" "${USER_CONFIG_FILE}")"
SN="$(readConfigKey "sn" "${USER_CONFIG_FILE}")"
LAYOUT="$(readConfigKey "layout" "${USER_CONFIG_FILE}")"
KEYMAP="$(readConfigKey "keymap" "${USER_CONFIG_FILE}")"
HDDSORT="$(readConfigKey "hddsort" "${USER_CONFIG_FILE}")"
CPUGOVERNOR="$(readConfigKey "governor" "${USER_CONFIG_FILE}")"
KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
RD_COMPRESSED="$(readConfigKey "rd-compressed" "${USER_CONFIG_FILE}")"
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
@ -175,9 +173,11 @@ chmod +x "${RAMDISK_PATH}/addons/addons.sh"
for ADDON in "redpill" "revert" "misc" "eudev" "disks" "localrss" "notify" "updatenotify" "wol" "mountloader"; do
PARAMS=""
if [ "${ADDON}" == "disks" ]; then
HDDSORT="$(readConfigKey "hddsort" "${USER_CONFIG_FILE}")"
PARAMS=${HDDSORT}
[ -f "${USER_UP_PATH}/${MODEL}.dts" ] && cp -f "${USER_UP_PATH}/${MODEL}.dts" "${RAMDISK_PATH}/addons/model.dts"
elif [ "${ADDON}" == "cpufreqscaling" ]; then
CPUGOVERNOR="$(readConfigKey "governor" "${USER_CONFIG_FILE}")"
PARAMS=${CPUGOVERNOR}
fi
installAddon "${ADDON}" "${PLATFORM}" || exit 1