From 6f56cbdb4d4d66490811673b28d59fec62fdabfc Mon Sep 17 00:00:00 2001 From: rallytime Date: Tue, 15 Nov 2016 16:27:48 -0700 Subject: [PATCH] Make sure cloud linux releasever matches our repo layout --- bootstrap-salt.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index ed10230..44f4db5 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1039,6 +1039,9 @@ __gather_linux_system_info() { n="Arch Linux" v="" # Arch Linux does not provide a version. ;; + cloudlinux ) + n="Cloud Linux" + ;; debian ) n="Debian" v=$(__derive_debian_numeric_version "$v") @@ -3455,7 +3458,13 @@ __install_saltstack_rhel_repository() { repo_url="repo.saltstack.com" fi - base_url="${HTTP_VAL}://${repo_url}/yum/redhat/\$releasever/\$basearch/${repo_rev}/" + # Cloud Linux $releasever = 7.x, which doesn't exist in repo.saltstack.com, we need this to be "7" + if [ "${DISTRO_NAME}" = "Cloud Linux" ] && [ "${DISTRO_MAJOR_VERSION}" = "7" ]; then + base_url="${HTTP_VAL}://${repo_url}/yum/redhat/${DISTRO_MAJOR_VERSION}/\$basearch/${repo_rev}/" + else + base_url="${HTTP_VAL}://${repo_url}/yum/redhat/\$releasever/\$basearch/${repo_rev}/" + fi + fetch_url="${HTTP_VAL}://${repo_url}/yum/redhat/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/${repo_rev}/" if [ "${DISTRO_MAJOR_VERSION}" -eq 5 ]; then