arc: rewrite settings

Signed-off-by: Christian <info@auxxxilium.tech>
This commit is contained in:
Christian
2024-03-17 16:20:21 +01:00
committed by GitHub
parent e96855ff78
commit 18b892e161

View File

@@ -368,15 +368,13 @@ function arcsettings() {
dialog --backtitle "$(backtitle)" --title "Arc Warning" \
--msgbox "WARN: Your CPU does not have AES Support for Hardwareencryption in DSM." 0 0
fi
# Check for NVMe only
HARDDRIVES="$(readConfigKey "device.harddrives" "${USER_CONFIG_FILE}")"
NVMEDRIVES="$(readConfigKey "device.nvmedrives" "${USER_CONFIG_FILE}")"
if [ "${BUS}" = "SATA" ] && [ $((${HARDDRIVES} - ${NVMEDRIVES})) -eq 1 ] && [ ! "${MODEL}" = "SA6400" ]; then
dialog --backtitle "$(backtitle)" --title "Arc Warning" \
--msgbox "WARN: You have only NVMe Drives.\nDSM will not boot without a SATA Drive.\nYou can use SA6400 and NVMeSystem Addon." 0 0
elif [ $((${HARDDRIVES} - ${NVMEDRIVES})) -eq 0 ] && [ ! "${MODEL}" = "SA6400" ]; then
dialog --backtitle "$(backtitle)" --title "Arc Warning" \
--msgbox "WARN: You have only NVMe Drives.\nDSM will not boot without a SATA Drive.\nYou can use SA6400 and NVMeSystem Addon." 0 0
# Check for KVM
KVMSUPPORT="$(readConfigKey "arc.kvm" "${USER_CONFIG_FILE}")"
if [ "${KVMSUPPORT}" = "true" ]; then
if ! grep -q -E '(vmx|svm)' /proc/cpuinfo; then
dialog --backtitle "$(backtitle)" --title "Arc Warning" \
--msgbox "WARN: Your CPU does not support KVM in DSM.\nCheck CPU/Bios for VMX or SVM Support." 0 0
fi
fi
# Config is done
writeConfigKey "arc.confdone" "true" "${USER_CONFIG_FILE}"