From 45e9171849812f1372a55e84720b2465dc0bdcbf Mon Sep 17 00:00:00 2001 From: Teddysun Date: Tue, 8 Sep 2020 11:12:24 +0900 Subject: [PATCH] Update comments --- bbr.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bbr.sh b/bbr.sh index 1732af2..2aa6ced 100644 --- a/bbr.sh +++ b/bbr.sh @@ -265,10 +265,12 @@ install_kernel() { case "$(_os)" in centos) if [ -n "$(_os_ver)" ]; then - _error_detect "rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org" - [ "$(_os_ver)" -eq 6 ] && _error_detect "rpm -Uvh https://www.elrepo.org/elrepo-release-6-10.el6.elrepo.noarch.rpm" - [ "$(_os_ver)" -eq 7 ] && _error_detect "rpm -Uvh https://www.elrepo.org/elrepo-release-7.0-5.el7.elrepo.noarch.rpm" - [ "$(_os_ver)" -eq 8 ] && _error_detect "rpm -Uvh https://www.elrepo.org/elrepo-release-8.2-1.el8.elrepo.noarch.rpm" + if [ ! -f "/etc/yum.repos.d/elrepo.repo" ]; then + _error_detect "rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org" + [ "$(_os_ver)" -eq 6 ] && _error_detect "rpm -Uvh https://www.elrepo.org/elrepo-release-6-10.el6.elrepo.noarch.rpm" + [ "$(_os_ver)" -eq 7 ] && _error_detect "rpm -Uvh https://www.elrepo.org/elrepo-release-7.0-5.el7.elrepo.noarch.rpm" + [ "$(_os_ver)" -eq 8 ] && _error_detect "rpm -Uvh https://www.elrepo.org/elrepo-release-8.2-1.el8.elrepo.noarch.rpm" + fi [ ! -f "/etc/yum.repos.d/elrepo.repo" ] && _error "Install elrepo failed, please check it and retry." if ! _exists "yum-config-manager"; then _error_detect "yum install -y yum-utils"