From a537342633707544c645cba0c3d46f2180c3b570 Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Tue, 4 Nov 2014 15:56:36 +0100 Subject: Portability fix: mount.glusterfs Remove bash-specific syntax from mount.glusterfs BUG: 1129939 Change-Id: Iec3a52686f7cee1825ac5a06c11fb8ac4d3e5d65 Signed-off-by: Emmanuel Dreyfus Reviewed-on: http://review.gluster.org/9044 Tested-by: Gluster Build System Reviewed-by: Kaleb KEITHLEY Reviewed-by: Vijay Bellur --- xlators/mount/fuse/utils/mount_glusterfs.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xlators/mount') 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 -- cgit