arc: some optimization
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
@@ -428,9 +428,7 @@ function synoinfoMenu() {
|
||||
echo "1 \"Add/edit Synoinfo item\"" >"${TMP_PATH}/menu"
|
||||
echo "2 \"Delete Synoinfo item(s)\"" >>"${TMP_PATH}/menu"
|
||||
echo "3 \"Show Synoinfo entries\"" >>"${TMP_PATH}/menu"
|
||||
echo "4 \"Add optimized Synoinfo\"" >>"${TMP_PATH}/menu"
|
||||
echo "5 \"Thermal Shutdown (DT only)\"" >>"${TMP_PATH}/menu"
|
||||
echo "6 \"Set Maxdisks for DSM\"" >>"${TMP_PATH}/menu"
|
||||
echo "4 \"Thermal Shutdown (DT only)\"" >>"${TMP_PATH}/menu"
|
||||
|
||||
# menu loop
|
||||
while true; do
|
||||
@@ -508,18 +506,6 @@ function synoinfoMenu() {
|
||||
--aspect 18 --msgbox "${ITEMS}" 0 0
|
||||
;;
|
||||
4)
|
||||
writeConfigKey "synoinfo.support_oob_ctl" "no" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "synoinfo.support_trim" "yes" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "synoinfo.support_disk_hibernation" "yes" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "synoinfo.support_bde_internal_10g" "no" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "synoinfo.support_btrfs_dedupe" "yes" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "synoinfo.support_tiny_btrfs_dedupe" "yes" "${USER_CONFIG_FILE}"
|
||||
dialog --backtitle "$(backtitle)" --title "Optimized Synoinfo entries" \
|
||||
--aspect 18 --msgbox "Optimized Synoinfo is written to Config." 0 0
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
;;
|
||||
5)
|
||||
MODEL="$(readConfigKey "model" "${USER_CONFIG_FILE}")"
|
||||
CONFDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
PLATFORM="$(readModelKey "${MODEL}" "platform")"
|
||||
@@ -579,16 +565,6 @@ function synoinfoMenu() {
|
||||
--msgbox "Please build and install DSM first!" 0 0
|
||||
fi
|
||||
;;
|
||||
6)
|
||||
dialog --backtitle "$(backtitle)" --title "Set Maxdisks" \
|
||||
--inputbox "Set Maxdisks for DSM!" 0 0 \
|
||||
2>"${TMP_PATH}/input"
|
||||
MAXDISKS=$(cat "${TMP_PATH}/input")
|
||||
[ -z "${MAXDISKS}" ] && return 1
|
||||
writeConfigKey "device.maxdisks" "${MAXDISKS}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
return
|
||||
|
||||
@@ -435,6 +435,11 @@ function premake() {
|
||||
# Memory: Set mem_max_mb to the amount of installed memory to bypass Limitation
|
||||
writeConfigKey "synoinfo.mem_max_mb" "${RAMMAX}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "synoinfo.mem_min_mb" "${RAMMIN}" "${USER_CONFIG_FILE}"
|
||||
# Optimized Synoinfo
|
||||
writeConfigKey "synoinfo.support_trim" "yes" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "synoinfo.support_disk_hibernation" "yes" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "synoinfo.support_btrfs_dedupe" "yes" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "synoinfo.support_tiny_btrfs_dedupe" "yes" "${USER_CONFIG_FILE}"
|
||||
# eMMC Boot Support
|
||||
if [ "${EMMCBOOT}" = "true" ]; then
|
||||
writeConfigKey "modules.mmc_block" "" "${USER_CONFIG_FILE}"
|
||||
|
||||
Reference in New Issue
Block a user