From 7df1671b5af320f2c5aaeadfccda2e64d2ff404e Mon Sep 17 00:00:00 2001 From: Harshavardhana Ranganath Date: Tue, 11 Aug 2009 13:21:11 +0000 Subject: mount.glusterfs had a problem understanding when "volfile" was given as one of the mount arguments. Signed-off-by: Anand V. Avati BUG: 204 (mount.glusterfs mounts to incorrect mount point) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=204 --- xlators/mount/fuse/utils/mount.glusterfs.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'xlators/mount/fuse/utils/mount.glusterfs.in') diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index 19418191a..6f9aaaa69 100755 --- a/xlators/mount/fuse/utils/mount.glusterfs.in +++ b/xlators/mount/fuse/utils/mount.glusterfs.in @@ -207,11 +207,12 @@ main () exit 0; } - mount_provided=$(echo "$@" | cut -f2 -d'/'); - - [ -n "$mount_provided" ] && { - mount_point="/$mount_provided"; - } + mount_point="" + for arg in "$@"; do + [ -d "$arg" ] && { + mount_point=$arg + } + done [ -z "$mount_point" ] && { usage; -- cgit