From c2d98f385a213df7777da9f5ff4fd23e4e999c17 Mon Sep 17 00:00:00 2001 From: imldy Date: Tue, 3 Nov 2020 15:58:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E9=9C=80=E5=88=A4=E6=96=AD=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E6=BA=90=E3=80=81=E7=9B=B4=E6=8E=A5=E4=BF=AE=E6=94=B9?= =?UTF-8?q?yum=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fasLocalInstall.bin | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/fasLocalInstall.bin b/fasLocalInstall.bin index bc7816e..cc66d5e 100644 --- a/fasLocalInstall.bin +++ b/fasLocalInstall.bin @@ -54,32 +54,12 @@ Installation_options() { # 替换yum源 replace_yum() { - if [[ ${YUM_Choice} == "China" ]]; then - echo "系统搭建方式等于China" >/dev/null 2>&1 - echo "正在更新YUM源,更新速度取决于服务器宽带......" - sleep 5 - mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak - cp /root/OpenVpnControl/dependence/Centos-7.repo /etc/yum.repos.d/CentOS-Base.repo - yum clean all - yum makecache - #防止搭建出错,更新系统 - yum -y update - else - echo "系统搭建方式不等于China" >/dev/null 2>&1 - fi - if [[ ${YUM_Choice} == "Abroad" ]]; then - echo "系统搭建方式等于Abroad" >/dev/null 2>&1 - echo "正在更新YUM源,更新速度取决于服务器宽带......" - sleep 5 - mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak - cp /root/OpenVpnControl/dependence/Centos-7.repo /etc/yum.repos.d/CentOS-Base.repo - yum clean all - yum makecache - #防止搭建出错,更新系统 - yum -y update - else - echo "系统搭建方式不等于Abroad" >/dev/null 2>&1 - fi + mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak + cp /root/OpenVpnControl/dependence/Centos-7.repo /etc/yum.repos.d/CentOS-Base.repo + yum clean all + yum makecache + #防止搭建出错,更新系统 + yum -y update } # 关闭Selinux