From 3d46d53bd00c34ebcb33785c4e1832635b619464 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 19 Mar 2014 19:10:27 +0000 Subject: [PATCH] Properly detect Scientific Linux. Refs #343. --- bootstrap-salt.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index deb788e..3c902cd 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -642,15 +642,15 @@ __gather_linux_system_info() { rv=$(lsb_release >/dev/null 2>&1) if [ $? -eq 0 ]; then DISTRO_NAME=$(lsb_release -si) - if [ "x$(echo "$DISTRO_NAME" | grep RedHat)" != "x" ]; then + if [ "${DISTRO_NAME}" = "Scientific" ]; then + DISTRO_NAME="Scientific Linux" + elif [ "x$(echo "$DISTRO_NAME" | grep RedHat)" != "x" ]; then # Let's convert CamelCase to Camel Case DISTRO_NAME=$(__camelcase_split "$DISTRO_NAME") - fi - if [ "${DISTRO_NAME}" = "openSUSE project" ]; then + elif [ "${DISTRO_NAME}" = "openSUSE project" ]; then # lsb_release -si returns "openSUSE project" on openSUSE 12.3 DISTRO_NAME="opensuse" - fi - if [ "${DISTRO_NAME}" = "SUSE LINUX" ]; then + elif [ "${DISTRO_NAME}" = "SUSE LINUX" ]; then # lsb_release -si returns "SUSE LINUX" on SLES 11 SP3 DISTRO_NAME="suse" fi @@ -685,6 +685,8 @@ __gather_linux_system_info() { redhat ) if [ ".$(egrep 'CentOS' /etc/${rsource})" != . ]; then n="CentOS" + elif [ ".$(egrep 'Scientific' /etc/${rsource})" != . ]; then + n="Scientific Linux" elif [ ".$(egrep 'Red Hat Enterprise Linux' /etc/${rsource})" != . ]; then n="ed at nterprise inux" else