We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60075f4 commit b96a50cCopy full SHA for b96a50c
1 file changed
codes/deploy/sys/yum/change-yum-repo.sh
@@ -12,7 +12,8 @@ echo -e "\n>>>>>>>>> 替换 yum repo 源"
12
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
13
14
# 执行 lsb_release 命令,获取系统发行版本
15
-version=`lsb_release -r | awk '{print substr($2,1,1)}'`
+# version=`lsb_release -r | awk '{print substr($2,1,1)}'` # 很多机器没有 lsb_release 命令
16
+version=`cat /etc/redhat-release | awk '{print substr($4,1,1)}'`
17
18
# 根据发型版本选择相应 yum 镜像
19
if [ ${version} == 5 ]; then
0 commit comments