From 9d42a6dd736ab554b8d906f7359bfc22aba5c3ec Mon Sep 17 00:00:00 2001 From: bin456789 Date: Sun, 10 Sep 2023 22:23:01 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E4=BF=AE=E5=A4=8D=E5=86=85=E5=AD=98?= =?UTF-8?q?=E4=B8=8D=E8=B6=B3=E6=97=B6=EF=BC=8C=E6=9C=AA=E5=9B=9E=E8=90=BD?= =?UTF-8?q?=E5=88=B0=E4=BA=91=E9=95=9C=E5=83=8F=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/reinstall.sh b/reinstall.sh index 376d7d8..8dac069 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -586,11 +586,16 @@ check_ram() { debian) ram_installer=384 ;; *) ram_installer=1024 ;; esac + ram_cloud_image=512 + case "$distro" in + opensuse | arch) cloud_image=1 ;; + esac + # ram 足够就用普通方法安装,否则如果内存大于512就用 cloud image # TODO: 测试 256 384 内存 - if [ $ram_size -lt $ram_cloud_image ]; then + if [ ! "$cloud_image" = 1 ] && [ $ram_size -lt $ram_installer ]; then if [ $ram_size -ge $ram_cloud_image ]; then info "RAM < $ram_installer MB. Switch to cloud image mode" cloud_image=1