From 7f4a38494bcf1899a7df5267bb1a6a030361773d Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 10 Aug 2026 05:58:28 +0000 Subject: [PATCH] =?UTF-8?q?v3.3:=20swap=20=E5=85=85=E8=B6=B3=E6=97=B6?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E8=BF=BD=E9=97=AE=E7=A1=AE=E8=AE=A4=EF=BC=8C?= =?UTF-8?q?=E5=87=8F=E5=B0=91=E4=BD=8E=E5=86=85=E5=AD=98=E5=B0=8F=E9=B8=A1?= =?UTF-8?q?=E7=9A=84=E5=A4=9A=E4=BD=99=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index afcee27..f08eb44 100755 --- a/install.sh +++ b/install.sh @@ -293,11 +293,11 @@ check_memory() { plain " fallocate -l 1G /swapfile && chmod 600 /swapfile && \\" plain " mkswap /swapfile && swapon /swapfile && \\" plain " echo '/swapfile none swap sw 0 0' >> /etc/fstab" + if ! ask_yes_no "现在继续安装吗?" "y"; then + die "已按你的选择中止。" "加好 swap 后重新运行本脚本即可。" + fi else - hint "已检测到 ${swap_mb} MB swap,风险较低,可继续。" - fi - if ! ask_yes_no "现在继续安装吗?" "y"; then - die "已按你的选择中止。" "加好 swap 后重新运行本脚本即可。" + hint "已检测到 ${swap_mb} MB swap,风险较低,自动继续。" fi else ok "内存:${mem_mb} MB(swap ${swap_mb} MB)"