arc-functions: add sequentialio menu

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-06-15 13:15:37 +02:00
parent acf242b3a9
commit 784bd4f181

View File

@ -600,6 +600,37 @@ function storagepanelMenu() {
return
}
###############################################################################
# Shows storagepanel menu to user
function sequentialIOMenu() {
CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
if [ "${CONFDONE}" == "true" ]; then
while true; do
dialog --backtitle "$(backtitle)" --cancel-label "Exit" --menu "SequentialIO" 0 0 0 \
1 "Enable for SSD Cache" \
2 "Disable for SSD Cache" \
2>"${TMP_PATH}/resp"
[ $? -ne 0 ] && break
case "$(cat ${TMP_PATH}/resp)" in
1)
dialog --backtitle "$(backtitle)" --colors --title "SequentialIO" \
--msgbox "SequentialIO enabled" 0 0
SEQUENTIAL="true"
;;
2)
dialog --backtitle "$(backtitle)" --colors --title "SequentialIO" \
--msgbox "SequentialIO disabled" 0 0
SEQUENTIAL="false"
;;
esac
done
writeConfigKey "addons.sequentialio" "${SEQUENTIAL}" "${USER_CONFIG_FILE}"
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
fi
return
}
###############################################################################
# Shows backup menu to user
function backupMenu() {