From 1a7bbd255fd02fbfee6a26b990d15d38402f1992 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Mon, 3 Dec 2012 17:04:02 +1300 Subject: [PATCH] is_suse false positives on Fedora Also, uses of is_suse were also always evaluating to true on Fedora. Change-Id: I068f3179edbfb295163a4e4faa4998f2f7b2c124 --- functions | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/functions b/functions index f2b12e21e2..9022675ad3 100644 --- a/functions +++ b/functions @@ -349,8 +349,7 @@ function is_suse { GetOSVersion fi - [[ "$os_VENDOR" = "openSUSE" || "$os_VENDOR" = "SUSE LINUX" ]] - return $? + [ "$os_VENDOR" = "openSUSE" ] || [ "$os_VENDOR" = "SUSE LINUX" ] } @@ -646,7 +645,7 @@ function pip_install { SUDO_PIP="env" else SUDO_PIP="sudo" - if [[ "$os_PACKAGE" = "deb" || is_suse ]]; then + if [[ "$os_PACKAGE" = "deb" ]] || is_suse; then CMD_PIP=/usr/bin/pip else CMD_PIP=/usr/bin/pip-python @@ -1040,7 +1039,7 @@ function get_rootwrap_location() { GetOSVersion fi - if [[ "$os_PACKAGE" = "deb" || is_suse ]]; then + if [[ "$os_PACKAGE" = "deb" ]] || is_suse; then echo "/usr/local/bin/$module-rootwrap" else echo "/usr/bin/$module-rootwrap" @@ -1057,7 +1056,7 @@ function qpid_is_supported() { # Qpid was introduced to Ubuntu in precise, disallow it on oneiric; it is # not in openSUSE either right now. - [[ "$DISTRO" = "oneiric" || is_suse ]] + [[ "$DISTRO" = "oneiric" ]] || is_suse return $? }