Browse Source

07env-install-centos.sh

master
lizw 3 years ago
parent
commit
55def9c155
  1. 6
      00base/07env-install-centos.sh

6
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
"

Loading…
Cancel
Save