From 0468b45cc971a66413a2a4d9a726507e6ab46d04 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Tue, 1 Aug 2023 23:33:14 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E6=9B=B4=E6=94=B9=E4=B8=A4=E6=AD=A5?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.sh | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/reinstall.sh b/reinstall.sh index c507c7d..a7ece92 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -771,25 +771,22 @@ esac # 设置 github 国内代理 set_github_proxy -# 以下目标系统需要进入alpine环境安装 -# cloud image -# ubuntu/alpine/windows/dd -# el8/9/fedora 任何架构 <2g -# el7 aarch64 <1.5g -if is_use_cloud_image || - [ "$distro" = "ubuntu" ] || - [ "$distro" = "alpine" ] || - [ "$distro" = "arch" ] || - [ "$distro" = "windows" ] || - [ "$distro" = "dd" ] || - { is_distro_like_redhat "$distro" && [ $releasever -ge 8 ] && [ $ram_size -lt 2048 ]; } || - { is_distro_like_redhat "$distro" && [ $releasever -eq 7 ] && [ $ram_size -lt 1536 ] && [ $basearch = "aarch64" ]; }; then +# 以下目标系统不需要进入alpine +# debian +# el7 x86_64 >=1g +# el7 aarch64 >=1.5g +# el8/9/fedora 任何架构 >=2g +if ! is_use_cloud_image && + { [ "$distro" = "debian" ] || + { is_distro_like_redhat "$distro" && [ $releasever -eq 7 ] && [ $ram_size -ge 1024 ] && [ $basearch = "x86_64" ]; } || + { is_distro_like_redhat "$distro" && [ $releasever -eq 7 ] && [ $ram_size -ge 1536 ] && [ $basearch = "aarch64" ]; } || + { is_distro_like_redhat "$distro" && [ $releasever -ge 8 ] && [ $ram_size -ge 2048 ]; }; }; then + setos nextos $distro $releasever +else # 安装alpine时,使用指定的版本。 alpine作为中间系统时,使用 3.18 [ "$distro" = "alpine" ] && alpine_releasever=$releasever || alpine_releasever=3.18 setos finalos $distro $releasever setos nextos alpine $alpine_releasever -else - setos nextos $distro $releasever fi # 测试链接