From 7430a7e9aa15b191fbc2988d6450cfc9d01ad69e Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 1 May 2015 16:42:55 +0100 Subject: [PATCH] systemd-python is only available in CentOS 7/OL 7 --- bootstrap-salt.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index aa598d9..9dc3403 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2892,11 +2892,13 @@ install_centos_git_deps() { yum install -y git --enablerepo=${_EPEL_REPO} || return 1 fi fi - if [ "$DISTRO_NAME_L" = "oracle_linux" ]; then - # try both ways --enablerepo=X disables ALL OTHER REPOS!!!! - yum install -y systemd-python || yum install -y systemd-python --enablerepo=${_EPEL_REPO} || return 1 - else - yum install -y systemd-python --enablerepo=${_EPEL_REPO} || return 1 + + if [ "$DISTRO_MAJOR_VERSION" -gt 6 ]; then + if [ "$DISTRO_NAME_L" != "oracle_linux" ]; then + yum install -y systemd-python || yum install -y systemd-python --enablerepo=${_EPEL_REPO} || return 1 + else + yum install -y systemd-python --enablerepo=${_EPEL_REPO} || return 1 + fi fi __git_clone_and_checkout || return 1