diff --git a/00base/07env-install-centos.sh b/00base/07env-install-centos.sh index bdf94db..47edf2f 100644 --- a/00base/07env-install-centos.sh +++ b/00base/07env-install-centos.sh @@ -230,12 +230,12 @@ function command::exec() { function init:update_yum_repos() { log::info "[update-yum-repos]" "更新yum源..." local host="127.0.0.1" + local repo="/etc/yum.repos.d/CentOS-Base.repo" local repo_bak="/etc/yum.repos.d/CentOS-Base.repo_bak" command::exec "${host}" " - $(declare -f utils::download_file) if [ ! -f "$repo_bak" ]; then - mv /etc/yum.repos.d/CentOS-Base.repo $repo_bak - utils::download_file ${YUM_REPOS} /etc/yum.repos.d/CentOS-Base.repo + mv $repo $repo_bak + wget --timeout=10 --waitretry=3 --tries=5 --retry-connrefused --no-check-certificate ${YUM_REPOS} -O $repo yum makecache fi "