更新 setup.sh

This commit is contained in:
2025-11-04 08:21:38 -08:00
parent 743d0b19df
commit 3a771e7ee0

View File

@@ -24,6 +24,7 @@ for choice in $choices; do
echo "输入Swap内存大小(MB) [默认: 2048]: " echo "输入Swap内存大小(MB) [默认: 2048]: "
read -t 30 -p "> " swap_size read -t 30 -p "> " swap_size
if [ $? -ne 0 ] || [ -z "$swap_size" ]; then if [ $? -ne 0 ] || [ -z "$swap_size" ]; then
swap_size=2048
echo -e "\n使用默认值: ${swap_size}MB" echo -e "\n使用默认值: ${swap_size}MB"
fi fi
dd if=/dev/zero of=/swapfile bs=1M count=$swap_size dd if=/dev/zero of=/swapfile bs=1M count=$swap_size