This commit is contained in:
teldra 2021-08-18 08:40:40 +02:00
parent e6b27eba13
commit 1c46a3730b

View File

@ -131,7 +131,7 @@ if [[ "${ramsize}" -gt "0" ]] || [[ "${ramsize}" -le "2" ]]; then
elif [[ "${ramsize}" -gt "2" ]] && [[ "${ramsize}" -le "8" ]]; then elif [[ "${ramsize}" -gt "2" ]] && [[ "${ramsize}" -le "8" ]]; then
test -z "${hibernate}" && swapsize="${ramsize}" test -z "${hibernate}" && swapsize="${ramsize}"
test -z "${hibernate}" || swapsize="$(( ramsize * 2 ))" test -z "${hibernate}" || swapsize="$(( ramsize * 2 ))"
elif [[ "${ramsize}" -gt "8" ]] && [[ "${ramsize}" -le "15" ]]; then elif [[ "${ramsize}" -gt "8" ]] && [[ "${ramsize}" -lt "15" ]]; then
test -z "${hibernate}" && swapsize="${ramsize}" test -z "${hibernate}" && swapsize="${ramsize}"
test -z "${hibernate}" || swapsize="$(awk "BEGIN { printf(\"%.0f\n\", ${ramsize}*1.5); }")" test -z "${hibernate}" || swapsize="$(awk "BEGIN { printf(\"%.0f\n\", ${ramsize}*1.5); }")"
elif [[ "${ramsize}" -ge "15" ]]; then elif [[ "${ramsize}" -ge "15" ]]; then