[Bugs] [Bug 1476827] New: scripts: invalid test in S32gluster_enable_shared_storage.sh

bugzilla at redhat.com bugzilla at redhat.com
Mon Jul 31 14:37:36 UTC 2017


https://bugzilla.redhat.com/show_bug.cgi?id=1476827

            Bug ID: 1476827
           Summary: scripts: invalid test in
                    S32gluster_enable_shared_storage.sh
           Product: Red Hat Gluster Storage
           Version: 3.3
         Component: glusterfs
          Keywords: Triaged
          Assignee: atumball at redhat.com
          Reporter: kkeithle at redhat.com
        QA Contact: bmekala at redhat.com
                CC: bugs at gluster.org, rhs-bugs at redhat.com,
                    vbellur at redhat.com
        Depends On: 1476785
            Blocks: 1476819, 1476822



+++ This bug was initially created as a clone of Bug #1476785 +++

Description of problem:

line 5:

   if [ ! "$key" -eq "enable-shared-storage" -o "$key" -eq
"cluster.enable-shared-storage" ]; then

man page for test(1) says -eq takes two integer arguments; for strings use "=".

Also note the comment in the man page that says -a and -o are ambiguous and use
[ foo ] && [ foo ] or [ foo ] || [ foo ]

The correct syntax should be 

   if [ "$key" != "cluster.enable-shared-storage" ] && [ "$key" !=
"enable-shared-storage" ]; then

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Worker Ant on 2017-07-31 09:53:01 EDT ---

REVIEW: https://review.gluster.org/17925 (scripts: invalid test(1) in
extras/S32gluster_enable_shared_storage.sh) posted (#1) for review on master by
Kaleb KEITHLEY (kkeithle at redhat.com)


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1476785
[Bug 1476785] scripts: invalid test in S32gluster_enable_shared_storage.sh
https://bugzilla.redhat.com/show_bug.cgi?id=1476819
[Bug 1476819] scripts: invalid test in S32gluster_enable_shared_storage.sh
https://bugzilla.redhat.com/show_bug.cgi?id=1476822
[Bug 1476822] scripts: invalid test in S32gluster_enable_shared_storage.sh
-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=dQ0vULvSV9&a=cc_unsubscribe


More information about the Bugs mailing list