--- xlators/mount/fuse/utils/mount_glusterfs.in.orig	2017-06-28 05:25:12 UTC
+++ xlators/mount/fuse/utils/mount_glusterfs.in
@@ -463,50 +463,44 @@ parse_options()
         if [ "$key" = "$value" ]; then
             without_options $pair;
         else
             with_options $key $value;
         fi
     done
 }
 
 main ()
 {
-    ## `mount` on OSX specifies options as first argument
-    echo $1|grep -q -- "-o"
-    if [ $? -eq 0 ];  then
-        volfile_loc=$3
-        mount_point=$4
-    else
-        volfile_loc=$1
-        mount_point=$2
-    fi
-
     while getopts "Vo:h" opt; do
         case "${opt}" in
             o)
                 parse_options ${OPTARG};
                 ;;
             V)
                 ${cmd_line} -V;
                 exit 0;
                 ;;
             h)
                 print_usage;
                 exit 0;
                 ;;
             ?)
                 print_usage;
                 exit 0;
                 ;;
         esac
     done
 
+    shift $((OPTIND - 1))
+    volfile_loc="$1"
+    mount_point="$2"
+
     [ -r "$volfile_loc" ] || {
         # '%' included to support ipv6 link local addresses
         server_ip=$(echo "$volfile_loc" | sed -n 's/\([a-zA-Z0-9:%.\-]*\):.*/\1/p');
         volume_str=$(echo "$volfile_loc" | sed -n 's/.*:\([^ ]*\).*/\1/p');
         [ -n "$volume_str" ] && {
             volume_id="$volume_str";
         }
         volfile_loc="";
     }
 
