fix(frame): fix dnf install use iaas mirror instead of official
This commit is contained in:
@@ -101,11 +101,12 @@ function DNF_INSTALL() {
|
||||
if [[ location == "local" ]]; then
|
||||
reponames=$(grep '^\[.*\]' /etc/yum.repos.d/*.repo | tr -d [] | sed -e ':a;N;$!ba;s/\n/ /g')
|
||||
mapfile -t __install_pkgs < <(dnf --assumeno install ${__pkg_list[*]} 2>&1 | grep -wE "${reponames// /|}" | grep -wE "$(uname -m)|noarch" | awk '{print $1}')
|
||||
dnf -y install ${__pkg_list[*]}
|
||||
|
||||
if ! dnf -y install ${__pkg_list[*]}; then
|
||||
LOG_ERROR "pkg_list:${__pkg_list[*]} install failed."
|
||||
exit 1
|
||||
if ! dnf -y install --repo=mirror.iscas.ac.cn ${__pkg_list[*]}; then
|
||||
LOG_WARN "Install with mirror.iscas.ac.cn failed, retrying with default repos."
|
||||
if ! dnf -y install ${__pkg_list[*]}; then
|
||||
LOG_ERROR "pkg_list:${__pkg_list[*]} install failed."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
remoteIp=$[ "NODE"$node"_IPV4" ]
|
||||
|
||||
Reference in New Issue
Block a user