From 67763d1b39d396abe823c31a77b2525508e02cfa Mon Sep 17 00:00:00 2001 From: "Jean (east-high-Nerd)" Date: Tue, 14 Oct 2025 11:39:01 -0400 Subject: [PATCH] Added swap size limit of 32 GiB --- partition.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/partition.sh b/partition.sh index ec42d65..0d512d9 100755 --- a/partition.sh +++ b/partition.sh @@ -44,6 +44,10 @@ sgdisk \ if [[ "${ENABLE_SWAP}" == "yes" ]]; then SWAP_SIZE="$(((($(vmstat -sS M | grep 'total memory' | sed 's/ M total memory//') / 1024) + 1) * 2))" + if [[ "${SWAP_SIZE#}" -gt '32' ]]; then + SWAP_SIZE='32' + fi + sgdisk \ -n2:0:+${SWAP_SIZE}G \ -t2:BF02 \