summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/utils/mount_glusterfs.in
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mount/fuse/utils/mount_glusterfs.in')
-rwxr-xr-xxlators/mount/fuse/utils/mount_glusterfs.in26
1 files changed, 16 insertions, 10 deletions
diff --git a/xlators/mount/fuse/utils/mount_glusterfs.in b/xlators/mount/fuse/utils/mount_glusterfs.in
index eca84557e87..3a5feb606d7 100755
--- a/xlators/mount/fuse/utils/mount_glusterfs.in
+++ b/xlators/mount/fuse/utils/mount_glusterfs.in
@@ -234,9 +234,11 @@ start_glusterfs ()
cmd_line=$(echo "$cmd_line --xlator-option=$xlator_option");
fi
- # for rdma volume, we have to fetch volfile with '.rdma' added
- # to volume name, so that it fetches the right client vol file
- volume_id_rdma="";
+ if [ -n "$process_name" ]; then
+ cmd_line=$(echo "$cmd_line --process-name fuse.$process_name");
+ else
+ cmd_line=$(echo "$cmd_line --process-name fuse");
+ fi
if [ -z "$volfile_loc" ]; then
if [ -n "$server_ip" ]; then
@@ -276,15 +278,9 @@ start_glusterfs ()
if [ -n "$transport" ]; then
cmd_line=$(echo "$cmd_line --volfile-server-transport=$transport");
- if [ "$transport" = "rdma" ]; then
- volume_id_rdma=".rdma";
- fi
fi
if [ -n "$volume_id" ]; then
- if [ -n "$volume_id_rdma" ]; then
- volume_id="$volume_id$volume_id_rdma";
- fi
cmd_line=$(echo "$cmd_line --volfile-id=$volume_id");
fi
fi
@@ -398,6 +394,9 @@ with_options()
[ $value = "false" ] ; then
no_root_squash=1;
fi ;;
+ "process-name")
+ process_name=$value
+ ;;
*)
warn "Invalid option: $key"
exit 1
@@ -470,6 +469,7 @@ parse_options()
main ()
{
+#if !defined(__FreeBSD__)
## `mount` on OSX specifies options as first argument
echo $1|grep -q -- "-o"
if [ $? -eq 0 ]; then
@@ -479,7 +479,7 @@ main ()
volfile_loc=$1
mount_point=$2
fi
-
+#endif /* __FreeBSD__ */
while getopts "Vo:h" opt; do
case "${opt}" in
o)
@@ -500,6 +500,12 @@ main ()
esac
done
+#ifdef __FreeBSD__
+ shift $((OPTIND - 1))
+ volfile_loc="$1"
+ mount_point="$2"
+#endif /* __FreeBSD__ */
+
[ -r "$volfile_loc" ] || {
# '%' included to support ipv6 link local addresses
server_ip=$(echo "$volfile_loc" | sed -n 's/\([a-zA-Z0-9:%.\-]*\):.*/\1/p');