Browse code

is_suse false positives on Fedora

Also, uses of is_suse were also always evaluating to true
on Fedora.

Change-Id: I068f3179edbfb295163a4e4faa4998f2f7b2c124

Steve Baker authored on 2012/12/03 13:04:02
Showing 1 changed files
... ...
@@ -349,8 +349,7 @@ function is_suse {
349 349
         GetOSVersion
350 350
     fi
351 351
 
352
-    [[ "$os_VENDOR" = "openSUSE" || "$os_VENDOR" = "SUSE LINUX" ]]
353
-    return $?
352
+    [ "$os_VENDOR" = "openSUSE" ] || [ "$os_VENDOR" = "SUSE LINUX" ]
354 353
 }
355 354
 
356 355
 
... ...
@@ -646,7 +645,7 @@ function pip_install {
646 646
         SUDO_PIP="env"
647 647
     else
648 648
         SUDO_PIP="sudo"
649
-        if [[ "$os_PACKAGE" = "deb" || is_suse ]]; then
649
+        if [[ "$os_PACKAGE" = "deb" ]] || is_suse; then
650 650
             CMD_PIP=/usr/bin/pip
651 651
         else
652 652
             CMD_PIP=/usr/bin/pip-python
... ...
@@ -1040,7 +1039,7 @@ function get_rootwrap_location() {
1040 1040
         GetOSVersion
1041 1041
     fi
1042 1042
 
1043
-    if [[ "$os_PACKAGE" = "deb" || is_suse ]]; then
1043
+    if [[ "$os_PACKAGE" = "deb" ]] || is_suse; then
1044 1044
         echo "/usr/local/bin/$module-rootwrap"
1045 1045
     else
1046 1046
         echo "/usr/bin/$module-rootwrap"
... ...
@@ -1057,7 +1056,7 @@ function qpid_is_supported() {
1057 1057
 
1058 1058
     # Qpid was introduced to Ubuntu in precise, disallow it on oneiric; it is
1059 1059
     # not in openSUSE either right now.
1060
-    [[ "$DISTRO" = "oneiric" || is_suse ]]
1060
+    [[ "$DISTRO" = "oneiric" ]] || is_suse
1061 1061
     return $?
1062 1062
 }
1063 1063