diff options
author | Emmanuel Dreyfus <manu@netbsd.org> | 2014-11-04 15:57:59 +0100 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-11-16 23:05:12 -0800 |
commit | ff4d4030b9ad58b706fe2017cb3f426eb7bec77e (patch) | |
tree | 86bddba246c60b6f80bbe8610d460158ca1fd60a /xlators/mount | |
parent | 573a1b3f41aeb831919a472315b1cd48fe3999bf (diff) |
Portability fix: mount.glusterfs
Remove bash-specific syntax from mount.glusterfs
This is a backport of Iec3a52686f7cee1825ac5a06c11fb8ac4d3e5d65
BUG: 1138897
Change-Id: I3149cd4d94c862a3857709c00cf0ed0377976f40
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/9045
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mount')
-rwxr-xr-x | xlators/mount/fuse/utils/mount_glusterfs.in | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/mount/fuse/utils/mount_glusterfs.in b/xlators/mount/fuse/utils/mount_glusterfs.in index e0a06ea6925..dc326b4528f 100755 --- a/xlators/mount/fuse/utils/mount_glusterfs.in +++ b/xlators/mount/fuse/utils/mount_glusterfs.in @@ -449,7 +449,7 @@ without_options() parse_options() { local optarg=${1} - for pair in $(echo ${optarg//,/ }); do + for pair in $(echo $optarg | sed 's/,/ /g'); do key=$(echo "$pair" | cut -f1 -d'='); value=$(echo "$pair" | cut -f2- -d'='); if [ "$key" = "$value" ]; then @@ -463,7 +463,8 @@ parse_options() main () { ## `mount` on OSX specifies options as first argument - if [[ $1 =~ "-o" ]]; then + echo $1|grep -q -- "-o" + if [ $? -eq 0 ]; then volfile_loc=$3 mount_point=$4 else |