From e0fc0d73e63370f889cca6250ab2259c16fbae35 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 22 Jul 2014 13:56:47 +0100 Subject: [PATCH] Properly detect openSUSE with `lsb_release`. Fixes #430. --- bootstrap-salt.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 28fe035..5a48a33 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -683,8 +683,13 @@ __gather_linux_system_info() { # lsb_release -si returns "openSUSE project" on openSUSE 12.3 DISTRO_NAME="opensuse" elif [ "${DISTRO_NAME}" = "SUSE LINUX" ]; then - # lsb_release -si returns "SUSE LINUX" on SLES 11 SP3 - DISTRO_NAME="suse" + if [ "$(lsb_release -sd | grep -i opensuse)" != "" ]; then + # openSUSE 12.2 reports SUSE LINUX on lsb_release -si + DISTRO_NAME="opensuse" + else + # lsb_release -si returns "SUSE LINUX" on SLES 11 SP3 + DISTRO_NAME="suse" + fi elif [ "${DISTRO_NAME}" = "EnterpriseEnterpriseServer" ]; then # This the Oracle Linux Enterprise ID before ORACLE LINUX 5 UPDATE 3 DISTRO_NAME="Oracle Linux"